eliangcs / pystock-crawler

(UNMAINTAINED) Crawl and parse financial reports (XBRL) from SEC EDGAR, and daily stock prices from Yahoo Finance
MIT License
311 stars 105 forks source link

ScrapyDeprecationWarning: Module `scrapy.log` has been deprecated #21

Open andyyuan78 opened 9 years ago

andyyuan78 commented 9 years ago

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 commented 9 years ago

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

andyyuan78 commented 9 years ago

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 commented 7 years ago

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: Modulescrapy.loghas 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 commented 7 years ago

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

mlliarm commented 7 years ago

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

yecunhuang commented 7 years ago

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