JuliaPy / JuliaPy/PythonCall.jl

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

Ouverte
#490 1 commentaire 0 réactions 0 personnes assignées Voir sur GitHub
bug
Langage dominant
Julia
Étoiles
1.1k
Forks
86
Merge moyen
1 j 22 h
PR mergées (30 j)
3

Description

**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.

Guide de contribution

Aucun guide de contribution indexé pour ce dépôt

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.