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

ScrapyDeprecationWarning: Module scrapy.log has been deprecated #21

Open
andyyuan78 opened this issue Sep 9, 2015 · 6 comments
Open

Comments

@andyyuan78
Copy link

ubgpu@ubgpu:/github/pystock-crawler$
ubgpu@ubgpu:
/github/pystock-crawler$ PYTHONPATH=/usr/local/lib/python2.7/dist-packages pystock-crawler prices GOOG,YHOO -o out.csv --sort
/usr/local/bin/pystock-crawler:33: ScrapyDeprecationWarning: Module scrapy.log has been deprecated, Scrapy now relies on the builtin Python library for logging. Read the updated logging entry in the documentation to learn more.
from scrapy import log
Traceback (most recent call last):
File "/usr/local/bin/pystock-crawler", line 267, in
main()
File "/usr/local/bin/pystock-crawler", line 252, in main
log.start(logfile=log_file)
AttributeError: 'module' object has no attribute 'start'
ubgpu@ubgpu:/github/pystock-crawler$
ubgpu@ubgpu:
/github/pystock-crawler$ sudo pip2 install scrapy
Requirement already satisfied (use --upgrade to upgrade): scrapy in /usr/local/lib/python2.7/dist-packages
Cleaning up...
ubgpu@ubgpu:~/github/pystock-crawler$

@eliangcs
Copy link
Owner

What's your Scrapy version? You can use pip freeze to check.

@andyyuan78
Copy link
Author

wired~~

ubgpu@ubgpu:/github$ sudo pip2 install scrapy
[sudo] password for ubgpu:
Requirement already satisfied (use --upgrade to upgrade): scrapy in /usr/local/lib/python2.7/dist-packages
Cleaning up...
ubgpu@ubgpu:
/github$ pip2 freeze | grep scrapy
ubgpu@ubgpu:~/github$

@mlliarm
Copy link

mlliarm commented Jan 27, 2017

Hello, cool project.

I know that this is an old (but open?) issue, but I get the same error on Scrapy==1.3.0, on a Ubuntu 16.04.1 LTS when I run the first of your examples.

(scraping) milia@Newton:pystocks$ pystock-crawler prices GOOG,YHOO -o out.csv /home/milia/.venvs/scraping/bin/pystock-crawler:33: ScrapyDeprecationWarning: Module scrapy.log has been deprecated, Scrapy now relies on the builtin Python library for logging. Read the updated logging entry in the documentation to learn more.
from scrapy import log
Traceback (most recent call last):
File "/home/milia/.venvs/scraping/bin/pystock-crawler", line 267, in <module>
main()
File "/home/milia/.venvs/scraping/bin/pystock-crawler", line 252, in main
log.start(logfile=log_file)
AttributeError: 'module' object has no attribute 'start'

Installation of scrapy and pystock-crawler went just fine inside a new virtualenv.

Any thoughts or pointers are welcome !

@eliangcs
Copy link
Owner

@mlliarm this project uses Scrapy 0.24.4. Can you reinstall Scrapy old version and try again?

@mlliarm
Copy link

mlliarm commented Jan 29, 2017

@eliangcs Thanks, I'll do that right now and let you know.
EDIT: It works just fine now !

@yecunhuang
Copy link

scrapy.log has been deprecated alongside its functions in favor of explicit calls to the Python standard logging. Keep reading to learn more about the new logging system ,the url is https://doc.scrapy.org/en/latest/topics/logging.html

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

4 participants