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

Server exceptions generate unicode error #354

Open
jeffdotthompson opened this issue Aug 26, 2018 · 6 comments
Open

Server exceptions generate unicode error #354

jeffdotthompson opened this issue Aug 26, 2018 · 6 comments

Comments

@jeffdotthompson
Copy link

We recently set up labrad on a new computer (Win10, Anaconda python environment, py 2.7.15) and our servers are behaving strangely. In particular, whenever a server raises an exception, the client sees the following exception:

cam.acquireSingle(r'I:\thompsonlab\AMO\Daily\1808\180824\test\test.png')
Traceback (most recent call last):
File "", line 1, in
File "C:\ProgramData\Anaconda2\lib\site-packages\labrad\client.py", line 65, in call
return f.result() if wait else f
File "C:\ProgramData\Anaconda2\lib\site-packages\concurrent\futures_base.py", line 462, in result
return self.__get_result()
File "C:\ProgramData\Anaconda2\lib\site-packages\concurrent\futures_base.py", line 414, in __get_result
raise exception_type, self._exception, self._traceback
labrad.types.types.Error: (0) TypeError("'unicode' does not have the buffer interface",) [payload=None]

It is always a unicode error, regardless of the exception raised by the underlying server function.

A workaround that we discovered is to set sendTracebacks=False in the server. This works fine.

However, we have not figured out the origin of the issue, or why it does not occur on any of our other computers. Since it appears that twisted is heavily involved in this, we tried downgrading from 18.7.0 to 17.1.0 (which is in use elsewhere in our lab), but this did not change anything.

Thanks!

@DanielSank
Copy link
Member

Heya @jeffdotthompson, nice to see you in cyberspace.

However, we have not figured out the origin of the issue, or why it does not occur on any of our other computers

To clarify, are the other computers running the same OS and Python interpreter?

@jeffdotthompson
Copy link
Author

Hi, Dan! Actually, the other computers are different--they are all running Windows 7 and Python 2.7.13.

@maffoo
Copy link
Contributor

maffoo commented Aug 29, 2018

@jeffdotthompson, which version of pylabrad are you using on the server machines?

@jeffdotthompson
Copy link
Author

Here's a running list of versions--if there's anything else you want me to add, or think that I should try downgrading, please let me know!

Not working (generates unicode error):
-Win10, Python 2.7.15, labrad 0.97.2, twisted 18.7.0 (also tried 17.1.0)

Working:
-Win7, Python 2.7.13, labrad 0.97.2, twisted 17.9.0

  • other machines, all of which are probably win7+py2.7.13

@DanielSank
Copy link
Member

I would definitely recommend starting with something that works, and changing one thing at a time until you see what breaks. Then we know where to look. I'd start with the Twisted version and go from there.

@jeffdotthompson
Copy link
Author

jeffdotthompson commented Sep 4, 2018 via email

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

3 participants