Open KamarajuKusumanchi opened 9 months ago
I got passed this with pip install -Iv selenium==4.2.0
Thanks @paulirish . I am able to get past this error with selenium 4.2.0 . But it looks like the schwab scraper is broken. It opens the chrome window, enters the password but it is not able to login. It does not work even if I manually enter the password. Since it is a different issue, I will open another issue for it.
The original environment file
% cat env_test_finance-dl.yml
name: test_finance-dl
channels:
- defaults
dependencies:
- python=3.12
- pip
- pip:
- git+https://github.com/jbms/finance-dl
is pulling
% conda list "^python$|selenium|chromedriver-binary" -n test_finance-dl
# packages in environment at /opt/rajulocal/miniconda3/envs/test_finance-dl:
#
# Name Version Build Channel
chromedriver-binary 122.0.6211.0.0 pypi_0 pypi
python 3.12.0 h996f2a0_0
selenium 4.16.0 pypi_0 pypi
selenium-requests 2.0.3 pypi_0 pypi
The error does not show up with
% cat env_test_finance-dl_v2.yml
name: test_finance-dl_v2
channels:
- defaults
dependencies:
- python=3.12
- pip
- pip:
- selenium==4.2.0
- chromedriver-binary==120.*
- git+https://github.com/jbms/finance-dl
which is pulling
% conda list "^python$|selenium|chromedriver-binary" -n test_finance-dl_v2
# packages in environment at /opt/rajulocal/miniconda3/envs/test_finance-dl_v2:
#
# Name Version Build Channel
chromedriver-binary 120.0.6099.109.0 pypi_0 pypi
python 3.12.0 h996f2a0_0
selenium 4.2.0 pypi_0 pypi
selenium-requests 1.4.1 pypi_0 pypi
I am specifying the chromedriver-binary version in the environment file since it has to match with my chrome's version.
% dpkg -l google-chrome-stable
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Architecture Description
+++-====================-================-============-=================================
ii google-chrome-stable 120.0.6099.199-1 amd64 The web browser from Google
The latest version of selenium is 4.16.0 (released on 2023-12-06 as per https://pypi.org/project/selenium/#history). It would be nice if finance-dl can support the latest version. If that is not possible, the correct selenium version should be specified in the dependencies.
this is probably related to the fact that previously an empty CHROMEDRIVER_CHROME_BINARY
was allowed but this is no longer the case (https://github.com/SeleniumHQ/selenium/pull/12328)
in my case I use a remote driver anyway (selenium docker container) so I decided to skip the setting if a remote is specified: https://github.com/moritzj29/finance-dl/commit/ae145aa9fb6708609549cf8f1eda8c025a07f9ed
but since people here do not mention remote drivers, I guess there needs to be some further tweaking... maybe just skip the setting if the env does not exist?
I am getting
when trying to run finance_dl.cli with schwab configuration. It is looking for os.getenv("CHROMEDRIVER_CHROME_BINARY") but could not find it. Could you please tell me how to fix the issue?
Steps to reproduce: Create an environment file
Create the environment
Activate the environment
Create a configuration file
Run
There is no CHROMEDRIVER_CHROME_BINARY environment variable set on my machine.
FWIW chromedriver-path shows