ImportError: cannot import name 'appengine' from 'urllib3.contrib' #2340
Closed
swapnil-up
started this conversation in
General
Replies: 1 comment
-
looks like a dependency issue. probably one of the dependency required by lightnovel-crawler had the wrong version. i suggest using a virtual environment for running the app |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I received the error: ImportError: cannot import name 'appengine' from 'urllib3.contrib' and had to google around for a bit too long to find out. Couldn't see anything specific which could solve it here. But a bit of googling resulted in some gains.
System used- Ubuntu
Installed via pip- did the whole pip, pip3, python -m options. updated python version and pip (was already upto date)
Traceback (most recent call last):
File "/home/swap/.local/bin/lncrawl", line 8, in
sys.exit(main())
File "/home/swap/.local/lib/python3.10/site-packages/lncrawl/init.py", line 14, in main
from .core import start_app
File "/home/swap/.local/lib/python3.10/site-packages/lncrawl/core/init.py", line 13, in
from .arguments import get_args
File "/home/swap/.local/lib/python3.10/site-packages/lncrawl/core/arguments.py", line 9, in
from .display import LINE_SIZE, epilog
File "/home/swap/.local/lib/python3.10/site-packages/lncrawl/core/display.py", line 9, in
from ..core.exeptions import LNException
File "/home/swap/.local/lib/python3.10/site-packages/lncrawl/core/exeptions.py", line 3, in
from cloudscraper.exceptions import CloudflareException
File "/home/swap/.local/lib/python3.10/site-packages/cloudscraper/init.py", line 10, in
from requests_toolbelt.utils import dump
File "/usr/lib/python3/dist-packages/requests_toolbelt/init.py", line 12, in
from .adapters import SSLAdapter, SourceAddressAdapter
File "/usr/lib/python3/dist-packages/requests_toolbelt/adapters/init.py", line 12, in
from .ssl import SSLAdapter
File "/usr/lib/python3/dist-packages/requests_toolbelt/adapters/ssl.py", line 16, in
from .._compat import poolmanager
File "/usr/lib/python3/dist-packages/requests_toolbelt/_compat.py", line 50, in
from urllib3.contrib import appengine as gaecontrib
ImportError: cannot import name 'appengine' from 'urllib3.contrib' (/home/swap/.local/lib/python3.10/site-packages/urllib3/contrib/init.py)
In the end, solved by updating requests-toolbelt to 1 or higher.
Inputted the following line to my terminal:
pip install -U 'requests-toolbelt>=1'
It now works. Hope this helps those who come after me. I hope I put it in the correct area, since I'm not sure if this classifies as an issue exactly.
Beta Was this translation helpful? Give feedback.
All reactions