-
Notifications
You must be signed in to change notification settings - Fork 386
TypeError: ord() expected string of length 1 on clear windows install #151
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Hmm. I think i've found a solution. Reinstalling msgpack after installing zerorpc seems to solve problem. Scripts\pip.exe install msgpack-python --force-reinstall --upgrade After this in c:\Python27\Lib\site-packages\msgpack two new files appeared (_packer.pyd and _unpacker.pyd) and zerorpc works now. I guess install files in pip are messed up? |
the zeromq pure Python fallback returns a different type than the speedy Honesty I tried fixing this problem many times already, and could never Of course you will be better of using the C/cython binding for performances See If you find a way to reliably fix this problem, I would happily accept a PR On Sun, Sep 18, 2016, 02:58 y666 notifications@github.com wrote:
|
So, are there any instructions on how to get it work properly? What is the recommended way of doing it the right way? |
I am on the same distribution and I do something like:
When I said I tried fixing this problem many times, I meant the bad On Tue, Sep 20, 2016, 03:50 Timo Furrer notifications@github.com wrote:
|
I haven't installed |
I just tried on some ubuntu 16.04. Here is exactly what I did:
And in a second terminal:
As it turns out the latest version of zmq is libzmq5 (not 4, my bad). I do not have the dev package, and everything just worked. I do have libev4 installed, which used by gevent, but I do not have the dev package either. I have also tried with python3:
And it worked as well. I then did:
I then performed the same test as above and it worked identically. So really I have no clue why it doesn't work for you. I wish I had a way to reproduce the issue. |
Reading pyzmq documentation and looking at the package, it looks like pyzmq is coming with its own compiled version of libzmq (version 4). That should explain why it works on my system without libzmq*-dev. It looks like it is the same system for gevent, as far as I can understand from the documentation. So in summary, the only thing you should need to install zerorpc on most systems is: |
this issues is fix in new msgpack code $ pip uninstall msgpack-python
$ wget https://github.com/msgpack/msgpack-python/archive/master.zip
$ unzip master.zip
$ cd msgpack-python-master/
$ pip install ./ it's work!!! |
@bombela for you, or anyone else playing at home: This header wasn't available by default on the Google Cloud images I'm using. |
I had this issue, when use pypy |
I've reinstalled clean python (2.7.12) and installed zerorpc via pip
Scripts/pip.exe install zerorpc
Trying to run an example gives:
Traceback (most recent call last):
File "C:\Python27\lib\site-packages\zerorpc\channel.py", line 78, in _channel_dispatcher
event = self._events.recv()
File "C:\Python27\lib\site-packages\zerorpc\events.py", line 365, in recv
event = Event.unpack(get_pyzmq_frame_buffer(blob))
File "C:\Python27\lib\site-packages\zerorpc\events.py", line 215, in unpack
unpacked_msg = unpacker.unpack()
File "C:\Python27\lib\site-packages\msgpack\fallback.py", line 570, in unpack
ret = self._fb_unpack(EX_CONSTRUCT, write_bytes)
File "C:\Python27\lib\site-packages\msgpack\fallback.py", line 498, in _fb_unpack
typ, n, obj = self._read_header(execute, write_bytes)
File "C:\Python27\lib\site-packages\msgpack\fallback.py", line 347, in _read_header
b = ord(c)
TypeError: ord() expected string of length 1, but memoryview found
I've zerorpc version 0.6.0, msgpack version 0.4.8.
The text was updated successfully, but these errors were encountered: