JuliaPy / JuliaPy/PythonCall.jl

AttributeError: 'NoneType' object has no attribute 'f_locals'

Đang mở
#490 1 bình luận 0 reaction 0 người được giao Xem trên GitHub
bug
Ngôn ngữ chính
Julia
Star
1.1k
Fork
86
Merge trung bình
1 ngày 22 giờ
Pull request đã merge (30 ngày)
3

Mô tả

**Affects:** PythonCall

**Describe the bug**
Minimal working example:

```julia
using PythonCall

sym = pyimport("sympy")

a = sym.Symbol("a", positive=true)
sym.lambdify(a, a)
```

```julia
Python: AttributeError: 'NoneType' object has no attribute 'f_locals'

Stacktrace:
[1] pythrow()
@ PythonCall.Core [~/.julia/packages/PythonCall/bb3ax/src/Core/err.jl:92](https://file+.vscode-resource.vscode-cdn.net/home/alberto/GitHub/PhD-Thesis-Notebooks/~/.julia/packages/PythonCall/bb3ax/src/Core/err.jl:92)
[2] errcheck
@ [~/.julia/packages/PythonCall/bb3ax/src/Core/err.jl:10](https://file+.vscode-resource.vscode-cdn.net/home/alberto/GitHub/PhD-Thesis-Notebooks/~/.julia/packages/PythonCall/bb3ax/src/Core/err.jl:10) [inlined]
[3] pycallargs(f::Py, args::Py)
@ PythonCall.Core [~/.julia/packages/PythonCall/bb3ax/src/Core/builtins.jl:212](https://file+.vscode-resource.vscode-cdn.net/home/alberto/GitHub/PhD-Thesis-Notebooks/~/.julia/packages/PythonCall/bb3ax/src/Core/builtins.jl:212)
[4] pycall(::Py, ::Py, ::Vararg{Py}; kwargs::@Kwargs{})
@ PythonCall.Core [~/.julia/packages/PythonCall/bb3ax/src/Core/builtins.jl:230](https://file+.vscode-resource.vscode-cdn.net/home/alberto/GitHub/PhD-Thesis-Notebooks/~/.julia/packages/PythonCall/bb3ax/src/Core/builtins.jl:230)
[5] pycall(::Py, ::Py, ::Vararg{Py})
@ PythonCall.Core [~/.julia/packages/PythonCall/bb3ax/src/Core/builtins.jl:220](https://file+.vscode-resource.vscode-cdn.net/home/alberto/GitHub/PhD-Thesis-Notebooks/~/.julia/packages/PythonCall/bb3ax/src/Core/builtins.jl:220)
[6] (::Py)(::Py, ::Vararg{Py}; kwargs::@Kwargs{})
@ PythonCall.Core [~/.julia/packages/PythonCall/bb3ax/src/Core/Py.jl:339](https://file+.vscode-resource.vscode-cdn.net/home/alberto/GitHub/PhD-Thesis-Notebooks/~/.julia/packages/PythonCall/bb3ax/src/Core/Py.jl:339)
[7] top-level scope
@ In[8]:5
```

**Your system**

```julia
Status `~/GitHub/PhD-Thesis-Notebooks/Project.toml`
[992eb4ea] CondaPkg v0.2.22
[429524aa] Optim v1.9.4
[6099a3de] PythonCall v0.9.19
[6c2fb7c5] QuantumToolbox v0.7.2
[a25cea48] SpecialPolynomials v0.4.9
```

```julia
julia> versioninfo()
Julia Version 1.10.2
Commit bd47eca2c8a (2024-03-01 10:14 UTC)
Build Info:
Official https://julialang.org/ release
Platform Info:
OS: Linux (x86_64-linux-gnu)
CPU: 32 × 13th Gen Intel(R) Core(TM) i9-13900KF
WORD_SIZE: 64
LIBM: libopenlibm
LLVM: libLLVM-15.0.7 (ORCJIT, goldmont)
Threads: 32 default, 0 interactive, 16 GC (on 32 virtual cores)
Environment:
JULIA_EDITOR = code
JULIA_NUM_THREADS = 32
```

```julia
CondaPkg Status /home/alberto/GitHub/PhD-Thesis-Notebooks/CondaPkg.toml
Environment
/home/alberto/GitHub/PhD-Thesis-Notebooks/.CondaPkg/env
Packages
numpy v1.26.4
sympy v1.12
```

**Additional context**
Add any other context about the problem here.

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.