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

Used options instead of {driver_name}_options #125

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

stajilov
Copy link

Solves the following issue

2022-12-16 12:31:36 [twisted] CRITICAL: 
Traceback (most recent call last):
  File "/home/vladimir/.local/lib/python3.10/site-packages/twisted/internet/defer.py", line 1697, in _inlineCallbacks
    result = context.run(gen.send, result)
  File "/home/vladimir/.local/lib/python3.10/site-packages/scrapy/crawler.py", line 116, in crawl
    self.engine = self._create_engine()
  File "/home/vladimir/.local/lib/python3.10/site-packages/scrapy/crawler.py", line 130, in _create_engine
    return ExecutionEngine(self, lambda _: self.stop())
  File "/home/vladimir/.local/lib/python3.10/site-packages/scrapy/core/engine.py", line 83, in __init__
    self.downloader = downloader_cls(crawler)
  File "/home/vladimir/.local/lib/python3.10/site-packages/scrapy/core/downloader/__init__.py", line 83, in __init__
    self.middleware = DownloaderMiddlewareManager.from_crawler(crawler)
  File "/home/vladimir/.local/lib/python3.10/site-packages/scrapy/middleware.py", line 60, in from_crawler
    return cls.from_settings(crawler.settings, crawler)
  File "/home/vladimir/.local/lib/python3.10/site-packages/scrapy/middleware.py", line 42, in from_settings
    mw = create_instance(mwcls, settings, crawler)
  File "/home/vladimir/.local/lib/python3.10/site-packages/scrapy/utils/misc.py", line 167, in create_instance
    instance = objcls.from_crawler(crawler, *args, **kwargs)
  File "/home/vladimir/.local/lib/python3.10/site-packages/scrapy_selenium/middlewares.py", line 62, in from_crawler
    middleware = cls(
  File "/home/vladimir/.local/lib/python3.10/site-packages/scrapy_selenium/middlewares.py", line 44, in __init__
    f'{options}': driver_options
NameError: name 'options' is not defined

[TypeError: WebDriver.init() got an unexpected keyword argument 'firefox_options' error using firefox_options as arguments in Selenium Python](https://stackoverflow.com/questions/70326002/typeerror-webdriver-init-got-an-unexpected-keyword-argument-firefox-opti
)

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

Successfully merging this pull request may close these issues.

1 participant