Skip to content

pyjlcallback not defined? #476

Closed
Closed
@MilesCranmer

Description

@MilesCranmer

In PySR unittests I'm getting the following issue when trying to upgrade to juliacall 0.9.16 (in this PR)

     File "/home/runner/work/PySR/PySR/pysr/sr.py", line 1626, in _run
        bin_constraints=jl_array(bin_constraints),
                        ^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/home/runner/work/PySR/PySR/pysr/julia_helpers.py", line 33, in jl_array
        return jl_convert(jl.Array, x)
               ^^^^^^^^^^^^^^^^^^^^^^^
      File "/opt/hostedtoolcache/Python/3.12.2/x64/lib/python3.12/site-packages/juliacall/__init__.py", line 21, in convert
        _convert = PythonCall.seval("pyjlcallback((T,x)->pyjl(pyconvert(pyjlvalue(T)::Type,x)))")
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/home/runner/.julia/packages/PythonCall/F4kmJ/src/JlWrap/module.jl", line 25, in seval
        return self._jl_callmethod($(pyjl_methodnum(pyjlmodule_seval)), expr)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    juliacall.JuliaError: UndefVarError: `pyjlcallback` not defined

It seems that juliacall.convert is broken.


(Probably a good motivation to add #461 to make sure more of the API is covered by testing)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions