Closed scurrvy2020 closed 5 years ago
The xcauth 2.x releases require Python3.
On Ubuntu 18.04, urllib
is in package python3-future
. You may want to check your distro or install it via pip3
(or pip
, if Python3 is your default).
Thanks for your reply. I was trying to install v1.1.0, but I had the same error with 2.0.2. I installed python-future (python3) and python2-future from the manjaro repository and changed to v2.0.2. I still get the same error. With python3 I get an additional syntax error.
`Python3:
Traceback (most recent call last):
File "./xcauth.py", line 3, in <module>
from xclib.configuration import get_args
File "/opt/xmpp-cloud-auth/xclib/__init__.py", line 5, in <module>
from xclib.sigcloud import sigcloud
File "/opt/xmpp-cloud-auth/xclib/sigcloud.py", line 9, in <module>
from xclib.roster import roster
File "/opt/xmpp-cloud-auth/xclib/roster.py", line 42
def try_roster(self, async=True):
^
SyntaxError: invalid syntax
Python2:
Traceback (most recent call last):
File "./xcauth.py", line 3, in <module>
from xclib.configuration import get_args
File "/opt/xmpp-cloud-auth/xclib/__init__.py", line 5, in <module>
from xclib.sigcloud import sigcloud
File "/opt/xmpp-cloud-auth/xclib/sigcloud.py", line 1, in <module>
import urllib.request, urllib.parse, urllib.error
ImportError: No module named request`
Okay, I've figured a little bit out. It looks like in python 3.7 async
is no longer valid and it needs to be changed to async_
. https://github.com/pypa/pipenv/issues/956
I made those changes to a few of the files and I'm able to get it to run without errors. My service is still failing though.
Okay, got it working! Manjaro also needs python-systemd
as a dependency.
Can you list your changes? (e.g., as a pull request)
I'm still a newb at this, but I'll try to figure out how to do a pull request with the changes for you.
The standard workflow (unfortunately, not as simple as I would like):
git checkout -b python37-compatibility
)I think I got it. Thanks for the bit of guidance.
The change is in your repository right now. Can you also click on the Create Pull Request button below the green Clone or Download in your repository?
Ah, just noticed you already did, but (accidentally, I believe) closed the pull request.
I'm trying to install this on Arch. I have everything setup and modified the files as needed. When I execute /opt/xmpp-cloud-auth/xcauth.py I get this output:
Traceback (most recent call last): File "./xcauth.py", line 3, in <module> from xclib.configuration import get_args File "/opt/xmpp-cloud-auth/xclib/__init__.py", line 4, in <module> from xclib.sigcloud import sigcloud File "/opt/xmpp-cloud-auth/xclib/sigcloud.py", line 1, in <module> import urllib.request, urllib.parse, urllib.error ImportError: No module named request
It looks like a python problem to me (this is with python2 shebang). it looks like it isn't able to import the modules included in the package. I've tried adding to $PYTHONPATH and using sys.path, but I still get errors.