scrapinghub / scrapinghub-entrypoint-scrapy

Scrapy entrypoint for Scrapinghub job runner
BSD 3-Clause "New" or "Revised" License
25 stars 16 forks source link

Scrapy 2.6 support #64

Closed Gallaecio closed 2 years ago

Gallaecio commented 2 years ago
Traceback (most recent call last):
  File "/usr/local/bin/shub-image-info", line 8, in <module>
    sys.exit(shub_image_info())
  File "/usr/local/lib/python3.10/site-packages/sh_scrapy/crawl.py", line 209, in shub_image_info
    _run_usercode(None, ['scrapy', 'shub_image_info'] + sys.argv[1:],
  File "/usr/local/lib/python3.10/site-packages/sh_scrapy/crawl.py", line 148, in _run_usercode
    _run(args, settings)
  File "/usr/local/lib/python3.10/site-packages/sh_scrapy/crawl.py", line 103, in _run
    _run_scrapy(args, settings)
  File "/usr/local/lib/python3.10/site-packages/sh_scrapy/crawl.py", line 111, in _run_scrapy
    execute(settings=settings)
  File "/usr/local/lib/python3.10/site-packages/scrapy/cmdline.py", line 140, in execute
    cmd.add_options(parser)
  File "/usr/local/lib/python3.10/site-packages/sh_scrapy/commands/shub_image_info.py", line 23, in add_options
    parser.add_option("--debug", action="store_true",
AttributeError: 'ArgumentParser' object has no attribute 'add_option'. Did you mean: '_add_action'?

Caused by https://github.com/scrapy/scrapy/pull/5374

ahmedshahriar commented 2 years ago

Any update on this?

elacuesta commented 2 years ago

Any update on this?

Nothing more to do here, it was fixed by #65 and released as v0.13.0

stefan1984 commented 1 year ago

Any update on this?

Gallaecio commented 1 year ago

Anyone still affected by this at this point is likely not using the latest version of this package.

In Scrapy Cloud, the default Scrapy stack uses an old version of this package (and of Scrapy, etc.). You need to either upgrade your stack to scrapy:2.7 or later, or include scrapinghub-entrypoint-scrapy>=0.13.0 in your requirements.txt file to force its upgrade to the latest version.