from scrapy import signals, log as scrapy_log builtins.ImportError: cannot import name 'log'
See original GitHub issueI installed scrapyrt
today, but calling a GET request results in an error, which was reported at https://github.com/scrapy/scrapyd/issues/311
I followed the issue above, and downgraded Twisted with pip3 install Twisted==18.9.0
.
After that, however, scrapyrt
is producing a different error, saying…
2019-07-28 16:53:22+0200 [scrapyrt] Unhandled Error
Traceback (most recent call last):
...
File "/home/user/app/scrapy-test/my_venv/lib64/python3.6/site-packages/scrapyrt/core.py", line 9, in <module>
from scrapy import signals, log as scrapy_log
builtins.ImportError: cannot import name 'log'
Could I ask for help to fix it?
It’s running on Python 3.6.3
Scrapy
is 1.7.1
Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (2 by maintainers)
Top Results From Across the Web
ImportError: cannot import name 'log' from 'scrapy'
Did you try import logging instead of 'from scrapy import signals, log' after 'pip install scrapy'.
Read more >Logging — Scrapy 2.7.1 documentation
You can use a different logger just by getting its name with the logging.getLogger function: import logging logger = logging.
Read more >ImportError: cannot import name 'log' - Support - Zyte
I am using python 3.6, I have the requirements.txt file in the same directory as scrapy.cfg and its showing python 2.7 not sure...
Read more >Logging — Scrapy 1.0.5 文档
Scrapy uses Python's builtin logging system for event logging. We'll provide some simple examples to ... import logging logging.warning("This is a warning").
Read more >[Tutor] ImportError: cannot import name log
import sys from django.core.signals import got_request_exception from . import log logger = log._get_logger() def got_request_exception_callback(sender ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
A workaround is to downgrade Scrapy to v1.6.0.
fixed in #90