CyberPunkMetalHead / binance-trading-bot-new-coins

This Binance trading bot detects new coins as soon as they are listed on the Binance exchange and automatically places sell and buy orders. It comes with trailing stop loss and other features. If you like this project please consider donating via Brave.
MIT License
1.46k stars 268 forks source link

OSError: [Errno 8] Exec format error: '.... chromedriver_py/chromedriver_linux64' #67

Open shaft8472 opened 3 years ago

shaft8472 commented 3 years ago

I'm getting the following error when running the latest version on my Raspberry Pi. Not sure what's wrong with chromedriver. I've installed it, as well as selenium.

Traceback (most recent call last): File "/root/new-coin-bot/main.py", line 4, in from new_listings_scraper import * File "/root/new-coin-bot/new_listings_scraper.py", line 15, in driver = webdriver.Chrome(executable_path=binary_path, options=chrome_options) File "/usr/local/lib/python3.9/dist-packages/selenium/webdriver/chrome/webdriver.py", line 73, in init self.service.start() File "/usr/local/lib/python3.9/dist-packages/selenium/webdriver/common/service.py", line 72, in start self.process = subprocess.Popen(cmd, env=self.env, File "/usr/lib/python3.9/subprocess.py", line 951, in init self._execute_child(args, executable, preexec_fn, close_fds, File "/usr/lib/python3.9/subprocess.py", line 1823, in _execute_child raise child_exception_type(errno_num, err_msg, err_filename) OSError: [Errno 8] Exec format error: '/usr/local/lib/python3.9/dist-packages/chromedriver_py/chromedriver_linux64'

pat-s commented 2 years ago

The new dependency on chromedriver and selenium seems to include some issues for running on headless systems or on PIs. Getting the same error.

pat-s commented 2 years ago

I've found a solution

First do sudo apt-get install chromium-chromedriver and then edit the executable_path in new_listings_scraper.py and set it to

driver = webdriver.Chrome(executable_path='/usr/lib/chromium-browser/chromedriver', options=chrome_options)

Then run.sh should work.