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

Problem reported running on Ubuntu 12.04 #5

Open
dtalayco opened this issue Oct 31, 2014 · 1 comment
Open

Problem reported running on Ubuntu 12.04 #5

dtalayco opened this issue Oct 31, 2014 · 1 comment
Labels

Comments

@dtalayco
Copy link
Collaborator

A user reports hitting an error running the test target under Ubuntu 12.04, Python 2.7.3. The problem comes when running the field.py unit test which reports an unpack error on line 91 of field.py.

This may be a known issue with this version of Python. See:
http://stackoverflow.com/questions/20612587/struct-unpack-with-bytearrays

Current work around is to upgrade Python or use Ubuntu 14.04.

@dtalayco dtalayco added the bug label Oct 31, 2014
@naclomi
Copy link

naclomi commented Oct 31, 2014

I'm not sure if this has unintended side-effects, but it appears that you can cast the bytearrays to strs when passing them to struct functions to avoid this bug. According to random person on the internet (http://stackoverflow.com/questions/9099145/where-are-python-bytearrays-used), the biggest real difference is that strings are immutable. This should be fine.

I have a copy of Python 2.7.3 compiled locally if you want to test any other workarounds.

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

No branches or pull requests

2 participants