-
Notifications
You must be signed in to change notification settings - Fork 9
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
Python3 support #40
Comments
Yep, just checked that too. Imports and prints can be fixed quite easily using the 2to3 tool. But there are also differences in byte/string handling (see example below). These can be fixed by usage of six `--------------------------------------------------------------------------- TypeError: memoryview: a bytes-like object is required, not 'str' The above exception was the direct cause of the following exception: TypeError Traceback (most recent call last) /home/lupinix/uws-client/uws/UWS/client.py in init(self, url, user, password, connection) /home/lupinix/uws-client/uws/UWS/connection.py in init(self, url, user, password) /home/lupinix/uws-client/venv/lib64/python3.5/base64.py in encodestring(s) /home/lupinix/uws-client/venv/lib64/python3.5/base64.py in encodebytes(s) /home/lupinix/uws-client/venv/lib64/python3.5/base64.py in _input_type_check(s) TypeError: expected bytes-like object, not str` |
I managed to kludge together a fix for the byte-string issue, and switch the imports and print statements, but then I got a 403 error when trying to submit a request: UWSError: No permission to access this resource I checked the credentials on the online version and confirmed that I could actually login. |
I see a pull request that with the description "Python3 support", could this be integrated? ''' ''' The module client is there, though. |
Does not currently support Python3. First noticed when tried to import client:
ImportError Traceback (most recent call last)
in ()
8 matplotlib.rcParams.update(matplotlib.rcParamsDefault)
9
---> 10 import uws.UWS.client as client
11
12 get_ipython().magic('matplotlib inline')
/usr/local/lib/python3.5/site-packages/uws/UWS/init.py in ()
1 # -- coding: utf-8 --
----> 2 import client
3 import connection
4 import models
5
ImportError: No module named 'client'
The error arises because Python3 needs relative imports to be explicitly defined.
The text was updated successfully, but these errors were encountered: