pip install py_interface crash
Closed this issue · 6 comments
Steps to reproduce:
pip3 install py_interface
Crash trying to run example:
--- py_interface/test ‹master› » ./pingpong_slave.py -d -n test@127.0.0.1 -c x
Traceback (most recent call last):
File "./pingpong_slave.py", line 23, in <module>
from py_interface import erl_term
File "/usr/local/lib/python3.6/site-packages/py_interface/__init__.py", line 16, in <module>
__import__('py_interface',globals(),locals(),__all__,-1)
ValueError: level must be >= 0
--- py_interface/test ‹master› »
quick fixed it, by changing : /usr/local/lib/python3.6/site-packages/py_interface/init.py
--- __import__('py_interface',globals(),locals(),__all__,-1)
+++ __import__('py_interface',globals(),locals(),__all__)
Is this a known issue?
No, not known, but then on the other hand, I think I've only built from source, never pip3 installed it. It seems the version on pypi is quite old: 0.93 (for python2, not 3) When you run pip3 install py_interface
, is that the version you get, or do you build some package from this git repo that you pip3 install?
That's the version i got from pip3 install
Can you build from source? I've actually never uploaded anything to pypi myself, so if you want to use it quickly, it might be faster to build than wait for me to figure out how to upload.
Works from source:
autoconf
make install
--- py_interface/test ‹master› » ./pingpong_slave.py -d -n test@127.0.0.1 -c x
Creating node...
Publishing node...
Creating mbox...
Registering mbox as p...
-GOING LOOPING-
erl_node_conn: new connection from ('127.0.0.1', 60923)
erl_node_conn: Sending handshake
erl_node_conn: Sending handshake
erl_node_conn: Sending handshake
erl_node: NODEUP: nodeName=x@127.0.0.1 connection=<py_interface.erl_node_conn.ErlNodeInConnection object at 0x10df53f28>
erl_node: ctrlMsg=(6, <erl-pid: node=<erl-atom: 'x@127.0.0.1'>, id=5, serial=0, creation=2>, <erl-atom: ''>, <erl-atom: 'p'>)
b"Incoming msg=(<erl-pid: node=<erl-atom: 'x@127.0.0.1'>, id=5, serial=0, creation=2>, <erl-atom: 'hello'>) (k=(), kw={})"
Sending it back to <erl-pid: node=<erl-atom: 'x@127.0.0.1'>, id=5, serial=0, creation=2>
erl_node_conn: Sending msg
erl_node_conn: InConnection: Connection broken
erl_node: NODENOWN: nodeName=x@127.0.0.1 connection=<py_interface.erl_node_conn.ErlNodeInConnection object at 0x10df53f28>
^CInterrupted. Exiting.
--- py_interface/test ‹master› »
--- erlang/2_nodes ‹master* ?› » erl -name x@127.0.0.1 -setcookie x \
-eval "{p,'test@127.0.0.1'}"' ! {self(),hello}, receive X -> io:format("Got ~p~n", [X]), halt() end.'
Erlang/OTP 20 [erts-9.2] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:10] [hipe] [kernel-poll:false] [dtrace]
Eshell V9.2 (abort with ^G)
(x@127.0.0.1)1> Got {<7159.2.0>,hello}
--- erlang/2_nodes ‹master* ?› »
Super! I"ll look into uploading it to pypi.
I've now uploaded py_interface to PyPI and I tried pip3 install py_interface
and it now downloads verison 2.3 instead, so I'll be closing this issue. Thanks to @ketralnis for doing a bit of administration over on PyPI, making it possible for me to upload.