trendoscope-algorithms / Tradingview-Telegram-Bot

This is a sample bot for Tradingview users who want to send alerts and chart screenshots to Telegram channel.
23 stars 29 forks source link

Cant send snapshot: No such file or directory: 'chromedriver' #1

Open mamolas opened 1 year ago

mamolas commented 1 year ago

can you pls share a sample postman json and the webhook url+query used? No matter how I try I can't get the screenshot on telegram, just the plain text, when I add the chart parameter to the query it breaks, the replit console shows: FileNotFoundError: [Errno 2] No such file or directory: 'chromedriver' the chart is public https://www.tradingview.com/chart/Y1yAPI3A/?symbol=BTCUSD

complete log:

172.31.196.1 - - [26/Oct/2023 14:52:27] "POST /webhook?jsonRequest=true HTTP/1.1" 200 -
[I] Chart :  Y1yAPI3A
[I] Ticker :  BTCUSD
[I] Payload: 
 ```Ticker  buy```
--->Setup selenium start : 2023-10-26 14:52:40.742908
172.31.196.1 - - [26/Oct/2023 14:52:40] "POST /webhook?jsonRequest=true&chart=r3riC0V&ticker=BTCUSD HTTP/1.1" 200 -
Exception in thread Thread-7:
Traceback (most recent call last):
  File "/home/runner/TV-TG-Bot-Trendoscope/venv/lib/python3.8/site-packages/selenium/webdriver/common/service.py", line 71, in start
    self.process = subprocess.Popen(cmd, env=self.env,
  File "/nix/store/2vm88xw7513h9pyjyafw32cps51b0ia1-python3-3.8.12/lib/python3.8/subprocess.py", line 858, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "/nix/store/2vm88xw7513h9pyjyafw32cps51b0ia1-python3-3.8.12/lib/python3.8/subprocess.py", line 1704, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'chromedriver'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/nix/store/2vm88xw7513h9pyjyafw32cps51b0ia1-python3-3.8.12/lib/python3.8/threading.py", line 932, in _bootstrap_inner
    self.run()
  File "/nix/store/2vm88xw7513h9pyjyafw32cps51b0ia1-python3-3.8.12/lib/python3.8/threading.py", line 870, in run
    self._target(*self._args, **self._kwargs)
  File "/home/runner/TV-TG-Bot-Trendoscope/captureutil.py", line 62, in send_chart
    driver = setup()
  File "/home/runner/TV-TG-Bot-Trendoscope/captureutil.py", line 25, in setup
    driver = webdriver.Chrome(options=chrome_options,
  File "/home/runner/TV-TG-Bot-Trendoscope/venv/lib/python3.8/site-packages/selenium/webdriver/chrome/webdriver.py", line 70, in __init__
    super(WebDriver, self).__init__(DesiredCapabilities.CHROME['browserName'], "goog",
  File "/home/runner/TV-TG-Bot-Trendoscope/venv/lib/python3.8/site-packages/selenium/webdriver/chromium/webdriver.py", line 90, in __init__
    self.service.start()
  File "/home/runner/TV-TG-Bot-Trendoscope/venv/lib/python3.8/site-packages/selenium/webdriver/common/service.py", line 81, in start
    raise WebDriverException(
selenium.common.exceptions.WebDriverException: Message: 'chromedriver' executable needs to be in PATH. Please see https://chromedriver.chromium.org/home

 
onderozcan commented 10 months ago

++ Same error here.

xlggit commented 8 months ago

+1 please fix it and show it on youtube ,