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

AttributeError: 'Options' object has no attribute 'set_headless' when running baskets.updatedb #4

Open
bdvir opened this issue Mar 17, 2024 · 2 comments

Comments

@bdvir
Copy link

bdvir commented Mar 17, 2024

I'm trying to use the baskets.updatedb command. However, I'm encountering an error, is the project still being maintained? it seems that the code related to selenium should be updated...

Steps to Reproduce:

  1. Installed Python dependencies with pip.
  2. Cloned the baskets repository and installed it.
  3. Attempted to run python3 -m baskets.updatedb portfolio.csv.

I'm using Python 3.10.12 on Ubuntu 22.04.3 LTS.

Running

pip install requests xlrd openpyxl selenium networkx numpy pandas pytest
git clone http://github.com/blais/baskets
cd baskets
python3 -m pip install .

Finished succsessfully.

But running:

python3 -m baskets.updatedb portfolio.csv

Raised an error AttributeError: 'Options' object has no attribute 'set_headless' (and later, TypeError: WebDriver.__init__() got an unexpected keyword argument 'executable_path'), I modified baskets/driverlib.py:

    # opts.set_headless(headless)
    if headless:
      opts.add_argument("--headless")
	
    # driver = webdriver.Chrome(executable_path=driver_exec, options=opts)
    driver = webdriver.Chrome(options=opts)

But another error raised...

@blais
Copy link
Collaborator

blais commented Mar 17, 2024

Project has rotted for a long time and not being actively maintained.
Needs to get rewritten using petl, probably.

@bdvir
Copy link
Author

bdvir commented Mar 17, 2024

ok, thanks for letting me know :)

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

No branches or pull requests

2 participants