Skip to content

Compatibility with scrapy 2.14.0 #358

@michaelbrunnbauer

Description

@michaelbrunnbauer

hi

I am using scrapyrt with scrapy-playwright. After upgrading from scrapy 2.13.4 to 2.14.0, I get this error:

Traceback (most recent call last):
  File "/home/scrapy/scrapy/lib/python3.10/site-packages/scrapy/core/downloader/handlers/__init__.py", line 103, in _load_handler
    dh = build_from_crawler(
  File "/home/scrapy/scrapy/lib/python3.10/site-packages/scrapy/utils/misc.py", line 144, in build_from_crawler
    instance = objcls.from_crawler(crawler, *args, **kwargs)  # type: ignore[attr-defined]
  File "/home/scrapy/scrapy/lib/python3.10/site-packages/scrapy_playwright/handler.py", line 173, in from_crawler
    return cls(crawler)
  File "/home/scrapy/scrapy/lib/python3.10/site-packages/scrapy_playwright/handler.py", line 141, in __init__
    super().__init__(settings=crawler.settings, crawler=crawler)
TypeError: HTTP11DownloadHandler.__init__() got an unexpected keyword argument 'settings'

Release notes for scrapy 2.14.0 state:

The built-in download handlers have been refactored, changing the signatures of their methods. This change should only affect user code that subclasses any of these handlers or calls their methods directly. (issue 6778, issue 7164)

This looks like scrapy-playwright needs to be updated?

Regards,

Michael Brunnbauer

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions