Skip to content

reload() twice crashes python3 #24

Closed
@sam81

Description

@sam81

Using python3.2 on Debian Wheezy, if I reload a script using PyCall the first time it works fine, but the second time I get an error. This does not happen with python2.7

 julia> require("ex.jl")

julia> reload("ex.jl")
ERROR: PyError (PyObject_Call) <class 'TypeError'>
TypeError("object of type 'NoneType' has no len()",)
  File "/usr/lib/python3.2/inspect.py", line 266, in getmembers
    for key in dir(object):

 in pyerr_check at /home/sam/.julia/PyCall/src/exception.jl:58
 in pycall at /home/sam/.julia/PyCall/src/PyCall.jl:85
 in pywrap at /home/sam/.julia/PyCall/src/PyCall.jl:518
 in include_from_node1 at loading.jl:91
 in reload_path at loading.jl:114
 in reload at loading.jl:59
at /media/ntfsShared/otherNoSynch/tmp/ex.jl:562

Test case, $ cat ex.jl

using PyCall
pyinitialize("python3")
@pyimport numpy as np
x = np.arange(10)

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