shamhi / TapSwapBot

Bot that mines coins in Tapswap
https://t.me/tapswap_bot
174 stars 58 forks source link

describing the main problem #92

Open MoeinNS opened 1 week ago

MoeinNS commented 1 week ago

Hi I run the script normally and its ok

but I wanna run the script as a service , I used this service content and it was ok

 [Unit]
Description=TapSwapBotService
After=network.target

[Service]
User=root
WorkingDirectory=/root/TapSwapBot/
Environment=PATH=/root/TapSwapBot/venv/bin/
ExecStart=/root/TapSwapBot/venv/bin/python3 /root/TapSwapBot/main.py -a 2

Restart=always

[Install]
WantedBy=multi-user.target

``

but a few days ago I've got this error like other guys

[Traceback (most recent call last):
  File "/data/data/com.termux/files/home/TapSwapBot/bot/core/tapper.py", line 112, in login
    chq_result = extract_chq(chq=chq)
                 ^^^^^^^^^^^^^^^^^^^^
  File "/data/data/com.termux/files/home/TapSwapBot/bot/utils/scripts.py", line 132, in extract_chq
    driver = web_driver(service=web_service(webdriver_path), options=options)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/data/data/com.termux/files/home/TapSwapBot/venv/lib/python3.11/site-packages/selenium/webdriver/firefox/webdriver.py", line 62, in __init__
    self.service.start()
  File "/data/data/com.termux/files/home/TapSwapBot/venv/lib/python3.11/site-packages/selenium/webdriver/common/service.py", line 98, in start
    self._start_process(self._path)
  File "/data/data/com.termux/files/home/TapSwapBot/venv/lib/python3.11/site-packages/selenium/webdriver/common/service.py", line 208, in _start_process
    self.process = subprocess.Popen(
                   ^^^^^^^^^^^^^^^^^
  File "/data/data/com.termux/files/usr/lib/python3.11/subprocess.py", line 1026, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "/data/data/com.termux/files/usr/lib/python3.11/subprocess.py", line 1953, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
OSError: [Errno 8] Exec format error: 'webdriver/geckodriver'

now how can I fix the service content to run the script ?

kamranmt21 commented 1 week ago

Your problem is related to my issue #91. I think it is a problem with the webdriver.