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

ImportError: cannot import name attrs when running axotor.py #21

Closed
MatejKovacic opened this issue Jul 7, 2017 · 7 comments
Closed

Comments

@MatejKovacic
Copy link

When I am runnign python axotor.py, I get this:

Traceback (most recent call last):
  File "axotor.py", line 10, in <module>
    from wh import WHMgr
  File "/home/matej/pyaxo/examples/wh.py", line 7, in <module>
    from wormhole.wormhole import wormhole
  File "/usr/local/lib/python2.7/dist-packages/wormhole/wormhole.py", line 3, in <module>
    from attr import attrs, attrib
ImportError: cannot import name attrs

Before that I did:

sudo apt-get install gcc libffi-dev libsodium-dev python-dev
sudo pip install pyaxo
git clone https://github.com/rxcomm/pyaxo
cd pyaxo
sudo python setup.py install
sudo pip install PySocks
sudo pip install stem
sudo pip install wormhole
sudo pip install txtorcon
sudo pip install magic-wormhole

cd examples/
python axotor.py

I am running Ubuntu 16.04.2 LTS, 64-bit.

@nimdajitam
Copy link

nimdajitam commented Jul 8, 2017

I get this error:

Traceback (most recent call last):
  File "axotor.py", line 10, in <module>
    from wh import WHMgr
  File "/Users/matija/axotest/pyaxo/examples/wh.py", line 7, in <module>
    from wormhole.wormhole import wormhole
ImportError: cannot import name wormhole

magic-wormhole version: 0.10.2

@MatejKovacic
Copy link
Author

I created virtual environment:
source ~/pyaxo/venv/bin/activate
...and run it:
python axotor.py
... and got different error now:

Traceback (most recent call last):
  File "axotor.py", line 8, in <module>
    import socks
ImportError: No module named socks

@MatejKovacic
Copy link
Author

BTW, I installed all the modules in virtual environment.

@felipedau
Copy link
Contributor

ImportError: cannot import name attrs

I believe magic wormhole did not have attrs listed as a requirement at that time. So that is probably the reason you got a different error later. That has been fixed.

ImportError: No module named socks

Unfortuantely there is not a proper setup for it, but the requirements are in the docstring:

This version of the chat client makes connections over the tor network.
The server creates an ephemeral hidden service and the client connects
to the hidden service. You will need to load the following additional
python modules for this to work: stem, pysocks, txtorcon, pysocks,
and magic-wormhole. They are available on pypi via pip.

ImportError: cannot import name wormhole

It looks like magic wormhole's API changed and wormhole() is now called create(). We will have to make some changes to axotor because installing all requirements will not make it run yet.

Thanks @MatejKovacic and @nimdajitam for the reports. @rxcomm and I will let you know as soon as that is fixed.

Sorry for the inconvenient and taking such a long time to reply :/

@rxcomm
Copy link
Owner

rxcomm commented Sep 14, 2017

I've got an update for axotor.py that fixes this problem. However it won't work until this bug is fixed in wormhole.

magic-wormhole/magic-wormhole#252

When that is fixed, I will push the commit.

@rxcomm
Copy link
Owner

rxcomm commented Sep 15, 2017

Fixed in update_wormhole branch.

This PR (#24) requires https://github.com/warner/magic-wormhole commit 7ad006950afa309af015b93c62a64da7749a6724 or later. Until he packages
a new release, magic-wormhole will need to be installed from git.

@rxcomm
Copy link
Owner

rxcomm commented Sep 15, 2017

Merged to master.

@rxcomm rxcomm closed this as completed Sep 15, 2017
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