Skip to content
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

TypeError: unicode not allowed, use setsockopt_string when use python3 #73

Open
fordguo opened this issue Oct 27, 2017 · 3 comments
Open

Comments

@fordguo
Copy link

fordguo commented Oct 27, 2017

the exception is:

 File "<string>", line 4, in raise_exc_info
  File "/usr/lib/python3.6/site-packages/tornado/gen.py", line 622, in Task
    func(*args, callback=_argument_adapter(set_result), **kwargs)
  File "/usr/lib/python3.6/site-packages/circusweb/client.py", line 52, in send_message
    return self.call(make_message(command, **props), callback)
  File "/usr/lib/python3.6/site-packages/circusweb/client.py", line 62, in call
    socket.setsockopt(zmq.IDENTITY, uuid.uuid4().hex)
  File "zmq/backend/cython/socket.pyx", line 374, in zmq.backend.cython.socket.Socket.set (zmq/backend/cython/socket.c:4610)
TypeError: unicode not allowed, use setsockopt_string

@Sustrak
Copy link

Sustrak commented Nov 15, 2017

I've solved this error by going to the /usr/lib/python3.6/site-packages/circusweb/client.py and replacing what the error tolds you:

socket.setsockopt(zmq.IDENTITY, uuid.uuid4().hex)
to
socket.setsockopt_string(zmq.IDENTITY, uuid.uuid4().hex)

also you have the same problem in the line 89 of the same file

socket.send(cmd)
to
socket.send_string(cmd)

But after all this fixes it stills dosen't work, at least in my case, because when you try to connect to the web console it redirects to itself asking again for the ip to connect

@zhangjianpinghik
Copy link

@Sustrak how to show cpu and mem usage in the circus-web, my circus-web can not show that

@waynew
Copy link

waynew commented Feb 16, 2018

@Sustrak Started digging into this - looks like it's because it's finding no endpoints. Not sure why that is, but that's the initial symptom.

Update: wasn't able to figure out exactly why in the time I had allotted. Hopefully someone else can figure it out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants