Closed lgeissbauer-btig closed 1 year ago
The object e
is created by e = pyerror("PyImport_ImportModule")
. I think JET is upset by the fact that pyerror
is currently type-unstable: it may return either an instance of PyError
or PyJlError
, but the latter only occurs in pyjlwrap
callbacks. In pyimport
it should always be a PyError
, in which case it has a msg
field and this is safe.
So, I don't think this is a bug in PyCall. But probably the code could be cleaned up so that in pyimport
we call a version of pyerror
that is guaranteed to return a PyError
object.
https://github.com/aviatesk/JET.jl/issues/450