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

Twisted Error when i run any URL #69

Open
hackermanxyz opened this issue Feb 10, 2022 · 1 comment
Open

Twisted Error when i run any URL #69

hackermanxyz opened this issue Feb 10, 2022 · 1 comment

Comments

@hackermanxyz
Copy link

when i run any URL like " python xsscrapy.py -u https://example.com "
so i got this error.

2022-02-09 22:19:55 [scrapy] INFO: Enabled extensions:
['scrapy.extensions.logstats.LogStats',
'scrapy.extensions.telnet.TelnetConsole',
'scrapy.extensions.corestats.CoreStats']
Unhandled error in Deferred:
2022-02-09 22:19:55 [twisted] CRITICAL: Unhandled error in Deferred:

2022-02-09 22:19:55 [twisted] CRITICAL:
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/twisted/internet/defer.py", line 1299, in _inlineCallbacks
result = g.send(result)
File "/usr/local/lib/python2.7/dist-packages/scrapy/crawler.py", line 90, in crawl
six.reraise(*exc_info)
File "/usr/local/lib/python2.7/dist-packages/scrapy/crawler.py", line 72, in crawl
self.engine = self._create_engine()
File "/usr/local/lib/python2.7/dist-packages/scrapy/crawler.py", line 97, in _create_engine
return ExecutionEngine(self, lambda _: self.stop())
File "/usr/local/lib/python2.7/dist-packages/scrapy/core/engine.py", line 66, in init
self.scheduler_cls = load_object(self.settings['SCHEDULER'])
File "/usr/local/lib/python2.7/dist-packages/scrapy/utils/misc.py", line 44, in load_object
mod = import_module(module)
File "/usr/lib/python2.7/importlib/init.py", line 37, in import_module
import(name)
File "/usr/local/lib/python2.7/dist-packages/scrapy/core/scheduler.py", line 6, in
from queuelib import PriorityQueue
File "/usr/local/lib/python2.7/dist-packages/queuelib/init.py", line 1, in
from queuelib.queue import FifoDiskQueue, LifoDiskQueue
File "/usr/local/lib/python2.7/dist-packages/queuelib/queue.py", line 7, in
from contextlib import suppress
ImportError: cannot import name suppress

please help me and fix this issue
thank you.
XSScrapy error

@decidedlygray
Copy link

No promises, but downgrading queuelib may fix the issue:

pip uninstall attrs
pip uninstall queuelib
pip install queuelib==1.5.0
pip install attrs

It looks like modern versions of some of those libraries require python3. If that doesn't work I might be able to find my working version and get a version locked requirements.txt for you

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

2 participants