0

My scrapy code gets this error on Scraping Hub, but not locally. AFAICT I'm using Python 3.8 and Scrapy 2.1.0 in both places.

Anybody know what's going on here? I can't find the source to StdoutLogger to try figuring it out.

File "/usr/local/lib/python3.8/site-packages/scrapy/extensions/feedexport.py", line 68, in __init__
    _stdout = sys.stdout.buffer
Dogweather
  • 15,512
  • 17
  • 62
  • 81
  • 1
    When you deployed to ScrapingHub... did you make sure to pick the actual 3.x image... it defaults to 2.7 unless told otherwise...eg: have you checked you've done what's in https://support.scrapinghub.com/support/solutions/articles/22000200387-deploying-python-3-spiders-to-scrapy-cloud – Jon Clements May 23 '20 at 18:41
  • Thanks @JonClements I'm using the 2.1 scrapy package which _looks_ to be Python 3, although the name isn't marked -py3. I'll trying another stack. – Dogweather May 23 '20 at 22:23
  • Does the issue happen with 2.0? – Gallaecio Jun 01 '20 at 10:03
  • Hmm, the failing line has been there for a while when Scrapy runs with Python 3. – Gallaecio Jun 01 '20 at 10:07
  • Is your code altering or wrapping `sys.stdout` in any way? Any idea where that `StdoutLogger` class comes from? – Gallaecio Jun 01 '20 at 10:09

0 Answers0