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

TypeError: __init__() got an unexpected keyword argument 'log_level' #1

Open
AsbjornOlling opened this issue Oct 8, 2022 · 2 comments
Labels
bug Something isn't working

Comments

@AsbjornOlling
Copy link

When running warc2graph on a warc file, I get this exception:

root@2069e5d56241:/pwd# warc2graph testwarc.warc.gz 
Traceback (most recent call last):
  File "/usr/local/bin/warc2graph", line 8, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.6/site-packages/warc2graph/cli.py", line 92, in main
    store_content=args.store_content)
  File "/usr/local/lib/python3.6/site-packages/warc2graph/warc2graph.py", line 91, in create_graph
    custom_tagset)
  File "/usr/local/lib/python3.6/site-packages/warc2graph/linkextraction.py", line 587, in extract_links
    browser = _set_up_browser()
  File "/usr/local/lib/python3.6/site-packages/warc2graph/linkextraction.py", line 160, in _set_up_browser
    exec_path = GeckoDriverManager(cache_valid_range=30, log_level=0, print_first_line=False).install()
TypeError: __init__() got an unexpected keyword argument 'log_level'

This happens in the python:3.6 and python:3.10 docker containers.

@esthet1cs
Copy link

esthet1cs commented Oct 10, 2022

Hi Asbjørn, thank you for testing!
I can reproduce the problem with the package provided via the Python Package Index (PYPI) in a virtual environment and with the package installed from this repo in a virtual environment. It seems like the problem is related to the Selenium version stated in the requirements.txt, which is Selenium 3.

The command line client worked for me after upgrading Selenium to Selenium 4 with pip install -U selenium in my virtual environment to Selenium 4.5.0. Alternatively, you can try to change the Selenium version in the requirements.txt, e.g. to 4.5.0 before installing or reinstalling the package. We'll check if this is a reliable fix for the problem and see if we can provide a quick fix via this repo or if this has other implications that I don't see right now.

@esthet1cs esthet1cs added the bug Something isn't working label Oct 10, 2022
@heinp
Copy link
Member

heinp commented Oct 10, 2022

I can avoid this error downgrading the webdriver-manager version to the one stated in the requirements.txt (3.3.0).
Please keep us updated, if this works for you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants