Closed dmr-x closed 6 years ago
Good Morning. Unfortunately I have to confirm that this change in pip10 broke a part of the startup verification procedure of TOB. I‘m going to provide an initial fix later today; it yet might need some days to arrive in pypi. BR, Ralph
As initial action I've altered theonionbox.py
to swallow the exception that is raised on trying to import get_installed_distribution
with pip10.
The relevant fix is in Lines 647 - 669 - precisely in 648 & 668/669. You can either grab this file from GitHub to replace the version currently installed on your system - or perform this minor mod by hand.
A sustainable fix will be provided with the next release.
Even with the line edited it is failing providing the following issue.
Traceback (most recent call last): File "/home/ricks/theonionbox/bin/theonionbox", line 11, in <module> sys.exit(main()) File "/home/ricks/theonionbox/local/lib/python2.7/site-packages/theonionbox/__main__.py", line 18, in main from .theonionbox import main as onion_main File "/home/ricks/theonionbox/local/lib/python2.7/site-packages/theonionbox/theonionbox.py", line 652 boxLog.debug('Required packages version verification:') ^ SyntaxError: invalid syntax
So the fix basically does not fix the problem.
The fix fixed this issue - yet induced a SyntaxError
.
Please make sure to indent the block covered by the try: ... except: ...
guards as shown below:
This was not committed correctly in the last version of theonionbox.py
. Fixed.
Thank you!
Thanks for fixing!
Finally fixed with the release of The Onion Box v4.2. Closed.
A user on #tor of irc.oftc.net reported this problem after installing
theonionbox
:I reproduced the import problem in an interactive python2 (2.7.13) session locally, in a fresh
virtualenv
:It is related to pip 10. I confirmed that the import works in a pip 9
virtualenv
I had around.My environment, for reference:
I searched to root cause this to pip 10.
Please see this pip issue for context: pypa/pip#5154
And see this thread on the Distutils-SIG mailing list for additional context.
Notably, see this issue comment which indicates:
I haven't looked at
theonionbox
's code, but this message on the mailing list might provide a solution.theonionbox
will need to change in order to accommodate this. Right now it appears that every user oftheonionbox
in a newvirtualenv
will encounter this issue unless they somehow get an older version ofpip
.