Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

On PythonCall load, UndefRefError: access to undefined reference

未关闭
#765 6 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
45/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
冷清
技术栈
julia, python
领域
backend

调研方向

首先,在 Ubuntu 上使用 Julia 1.12.6、Python 3.14.4 和 PythonCall v0.9.31 重新运行链接的 GitHub Actions job。结合 PythonCall's JlWrap/C.jl、C/pointers.jl 和 JlWrap/JlWrap.jl 中 stack trace 的位置,阅读 PyTensorStore.jl/src/PyTensorStore.jl。在该环境中 package 能够加载且不出现报告的 UndefRefError,即视为完成。

由索引模型根据 Issue 内容生成。

描述

bug

Affects: PythonCall

Describe the bug

https://github.com/JuliaIO/PyTensorStore.jl/actions/runs/24747323082/job/72507767012?pr=3

ERROR: LoadError: InitError: UndefRefError: access to undefined reference
Stacktrace:
  [1] _pyjl_new(t::Ptr{PythonCall.C.PyObject}, ::Ptr{PythonCall.C.PyObject}, ::Ptr{PythonCall.C.PyObject})
    @ PythonCall.JlWrap.Cjl ~/.julia/packages/PythonCall/83z4q/src/JlWrap/C.jl:24
  [2] PyObject_CallObject
    @ ~/.julia/packages/PythonCall/83z4q/src/C/pointers.jl:300 [inlined]
  [3] PyJuliaValue_New
    @ ~/.julia/packages/PythonCall/83z4q/src/JlWrap/C.jl:392 [inlined]
  [4] macro expansion
    @ ~/.julia/packages/PythonCall/83z4q/src/Core/Py.jl:118 [inlined]
  [5] pyjl(t::PythonCall.Py, v::Module)
    @ PythonCall.JlWrap ~/.julia/packages/PythonCall/83z4q/src/JlWrap/base.jl:7
  [6] pyjl
    @ ~/.julia/packages/PythonCall/83z4q/src/JlWrap/any.jl:400 [inlined]
  [7] Py
    @ ~/.julia/packages/PythonCall/83z4q/src/JlWrap/base.jl:141 [inlined]
  [8] macro expansion
    @ ~/.julia/packages/PythonCall/83z4q/src/Core/Py.jl:117 [inlined]
  [9] pysetattr
    @ ~/.julia/packages/PythonCall/83z4q/src/Core/builtins.jl:78 [inlined]
 [10] setproperty!(x::PythonCall.Py, k::Symbol, v::Module)
    @ PythonCall.Core ~/.julia/packages/PythonCall/83z4q/src/Core/Py.jl:281
 [11] __init__()
    @ PythonCall.JlWrap ~/.julia/packages/PythonCall/83z4q/src/JlWrap/JlWrap.jl:70
 [12] run_module_init(mod::Module, i::Int64)
    @ Base ./loading.jl:1445
 [13] register_restored_modules(sv::Core.SimpleVector, pkg::Base.PkgId, path::String)
    @ Base ./loading.jl:1433
 [14] _include_from_serialized(pkg::Base.PkgId, path::String, ocachepath::String, depmods::Vector{Any}; register::Bool)
    @ Base ./loading.jl:1321
 [15] _include_from_serialized
    @ ./loading.jl:1276 [inlined]
 [16] _require_search_from_serialized(pkg::Base.PkgId, sourcepath::String, build_id::UInt128, stalecheck::Bool; reasons::Dict{String, Int64}, DEPOT_PATH::Vector{String})
    @ Base ./loading.jl:2117
 [17] _require_search_from_serialized
    @ ./loading.jl:2011 [inlined]
 [18] __require_prelocked(pkg::Base.PkgId, env::String)
    @ Base ./loading.jl:2629
 [19] _require_prelocked(uuidkey::Base.PkgId, env::String)
    @ Base ./loading.jl:2495
 [20] macro expansion
    @ ./loading.jl:2423 [inlined]
 [21] macro expansion
    @ ./lock.jl:376 [inlined]
 [22] __require(into::Module, mod::Symbol)
    @ Base ./loading.jl:2388
 [23] require(into::Module, mod::Symbol)
    @ Base ./loading.jl:2364
 [24] top-level scope
    @ ~/work/PyTensorStore.jl/PyTensorStore.jl/src/PyTensorStore.jl:3
 [25] include(mod::Module, _path::String)
    @ Base ./Base.jl:306
 [26] include_package_for_output(pkg::Base.PkgId, input::String, depot_path::Vector{String}, dl_load_path::Vector{String}, load_path::Vector{String}, concrete_deps::Vector{Pair{Base.PkgId, UInt128}}, source::Nothing)
    @ Base ./loading.jl:3028
 [27] top-level scope
    @ stdin:5
 [28] eval(m::Module, e::Any)
    @ Core ./boot.jl:489
 [29] include_string(mapexpr::typeof(identity), mod::Module, code::String, filename::String)
    @ Base ./loading.jl:2874
 [30] include_string
    @ ./loading.jl:2884 [inlined]
 [31] exec_options(opts::Base.JLOptions)
    @ Base ./client.jl:315
 [32] _start()
    @ Base ./client.jl:550
during initialization of module JlWrap
in expression starting at /home/runner/work/PyTensorStore.jl/PyTensorStore.jl/src/PyTensorStore.jl:1

Your system
Please provide detailed information about your system:

Ubuntu Linux (Github Linux runner)
Julia 1.12.6
Python 3.14.4
PythonCall v0.9.31

Additional context
Add any other context about the problem here.

主要语言
Julia
星标
1.1k
派生
89
平均合并
2 天 15 小时
30 天内合并 PR
7

环境准备

这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

JuliaPy/PythonCall.jl 的其他 Issue

查看 JuliaPy/PythonCall.jl 的全部 Issue

相似的 Issue

更多 Julia Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。