Skip to content

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

Closed
@albertomercurio

Description

@albertomercurio

MWE:

using PythonCall

sym = pyimport("sympy")

a = sym.Symbol("a", positive=true)
sym.lambdify(a, a)
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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions