File "/usr/local/lib/python3.5/site-packages/sh_scrapy/crawl.py", line 165, in _launch
from sh_scrapy.log import initialize_logging
File "/usr/local/lib/python3.5/site-packages/sh_scrapy/log.py", line 7, in <module>
from scrapy import log, __version__
ImportError: cannot import name 'log'
Best Answer
n
nestor
said
over 3 years ago
Scrapy stack 1.7 was released 3 days ago, so use this stack instead of adding scrapy 1.7.3 to your requirements.txt on an older stack.
I am getting the exact same issue and not sure why. 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 why either. I just updated this to scrapy 1.7.3 from 1.6. Working fine on local but not on scraping hub. I did try adding import logging to the spider but did not help.
File "/usr/local/lib/python2.7/site-packages/sh_scrapy/crawl.py", line 165, in _launch
from sh_scrapy.log import initialize_logging
File "/usr/local/lib/python2.7/site-packages/sh_scrapy/log.py", line 7, in <module>
from scrapy import log, __version__
nestor
said
over 3 years ago
Answer
Scrapy stack 1.7 was released 3 days ago, so use this stack instead of adding scrapy 1.7.3 to your requirements.txt on an older stack.
N
Navneet Verma
said
almost 3 years ago
Changed the requirements.txt file to use Scrapy1.7 still facing the same issue.
basketcompare
Hi there,
Having a bit of trouble with this one and can't seem to pinpoint the issue. This is on scraping hub, no issues on local at all.
I've also specified that I am using python3.6 in my pipfile so not entirely sure why it is referencing python 3.5.
Any help would be much appreciated!
2019-08-04T20:46:03.288292 Traceback (most recent call last):
Less
Scrapy stack 1.7 was released 3 days ago, so use this stack instead of adding scrapy 1.7.3 to your requirements.txt on an older stack.
1 person has this question
- Oldest First
- Popular
- Newest First
Sorted by Oldest Firstthriveni
Hello,
What is the version of Scrapy used in local?
In the scrapy cloud, Scrapy 1.7.3 has been used as per the requirements.txt. scrapy.log has been deprecated in the recent versions as given in https://docs.scrapy.org/en/latest/topics/logging.html#topics-logging and it now uses Python's builtin Logging system.
Hence you would need to use as below:
David
I am getting the exact same issue and not sure why. 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 why either. I just updated this to scrapy 1.7.3 from 1.6. Working fine on local but not on scraping hub. I did try adding import logging to the spider but did not help.
nestor
Scrapy stack 1.7 was released 3 days ago, so use this stack instead of adding scrapy 1.7.3 to your requirements.txt on an older stack.
Navneet Verma
Changed the requirements.txt file to use Scrapy1.7 still facing the same issue.
-
Unable to select Scrapy project in GitHub
-
ScrapyCloud can't call spider?
-
Unhandled error in Deferred
-
Item API - Filtering
-
newbie to web scraping but need data from zillow
-
ValueError: Invalid control character
-
Cancelling account
-
Best Practices
-
Beautifulsoup with ScrapingHub
-
Delete a project in ScrapingHub
See all 434 topics