>
> ERROR: LoadError: PyError (:PyObject_Call) <type
> 'exceptions.AttributeError'>
> AttributeError("'PyCall.jl_Function' object has no attribute 'func_code'"
> ,)
>
>
The foo.func_code attribute of a Python function foo returns a code object
<http://akaptur.com/blog/2013/11/15/introduction-to-the-python-interpreter-2/>
representing
the compiled Python bytecode for foo. A Julia function is not going to
have this attribute, because it has no Python bytecode.
It's really surprising to me that the paho.mqtt.client module only works
for callbacks with func_code attributes, which means that it only works for
pure Python functions. Maybe you can inquire with the Paho authors to
find out why (and whether they can lift this limitation in a future
version).