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 with Tornado 5.0 #384

Open
m4ntic0r opened this issue Mar 10, 2018 · 7 comments
Open

ImportError with Tornado 5.0 #384

m4ntic0r opened this issue Mar 10, 2018 · 7 comments
Labels

Comments

@m4ntic0r
Copy link

I am trying to run wpull on a windows machine.

i installed python 3.6.4 (and tried with python 3.5.4, too) and run "pip3 install wpull"

everything is fine.

but when i start wpull.exe i only get the error

"ImportError: cannot import name 'SSLCertificateError'
Here is the full error: https://mm-vault.de/chevereto/image/7DLe

@m4ntic0r
Copy link
Author

i had the same error on a fresh debian 9 installation.

had to do the following:

pip3 install tornado==4.5.3
and later a
pip3 install html5lib==0.9999
for another errorfix.

@JustAnotherArchivist
Copy link
Contributor

You'll want html5lib==0.9999999, see #332.

As for the original import error, tornado.netutil will remove SSLCertificateError in version 5.0 (specifically, it was removed in tornadoweb/tornado@8cf55df). How did you install the dependencies? wpull's requirements.txt explicitly depends on a version of Tornado before 5.0.

However, there is still an issue here: it seems that SSLCertificateError has never been part of the public tornado.netutil API to begin with – at least it isn't mentioned in that module's documentation for the 4.5 branch. So wpull should probably never have relied on its presence in the first place.

@m4ntic0r
Copy link
Author

Just clean Windows and Debian 9 install. Then Python3 and pip3 install wpull.
Tornado 5.0 was installed automatically.

changed my html5lib from 0.9999 to html5lib==0.9999999

@JustAnotherArchivist
Copy link
Contributor

JustAnotherArchivist commented Mar 12, 2018

Which version of Tornado was installed exactly? (What does pip3 freeze say?)

(I was thinking it might be a pre-release version, but figured out what's actually going on since, see below.)

@JustAnotherArchivist
Copy link
Contributor

Nevermind, I think I know what's going on. While requirements.txt asks for a version before 5.0, install_requires in setup.py does not have any version requirements. pip install follows the install_requires instructions, so it just installs any Tornado version. Looks like we'll need to add some version constraints there. This is also relevant for html5lib.

On another note, according to Stack Overflow, wpull's dependencies in requirements.txt aren't declared properly either. The line for Tornado says >=3.2.2,<5.0, but this still allows alphas, betas, and release candidates of version 5.0 to be installed. >=3.2.2,<5.0a0 might work, but I'm not entirely sure about that. An alternative would be >=3.2.2,<4.9, since there most likely won't be any/many more versions on the 4.x branch.

@chfoo chfoo added the bug label Apr 16, 2018
@BarbzYHOOL
Copy link

I confirm the bug on deb 9 and the fix above

@JustAnotherArchivist JustAnotherArchivist changed the title Wpull on Windows always "Cannot import name 'SSLCertificateError'" ImportError with Tornado 5.0 Oct 10, 2018
anarcat added a commit to anarcat/wpull that referenced this issue Oct 31, 2018
SSLCertificateError was never part of the official tornado API and was
removed in v5. Instead of relying on that undocumented API, we use the
exception from the core `ssl` module which tornado now uses anyways.

Closes: ArchiveTeam#384
@InnovativeInventor
Copy link

I can confirm and reproduce this bug as well.

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

No branches or pull requests

5 participants