Browser Appears to Have Exited Issue
anhadjangra opened this issue · 1 comments
anhadjangra commented
Hey guys, so I've followed the steps outlined in #36 and #37 but when I go to run using ./run_tracker.sh
, this is the output that I get:
***** Restarting AboveTustin 2020-05-18 12:58:37.950139082+00:00
will crop
Traceback (most recent call last):
File "tracker.py", line 137, in <module>
display = datasource.get_map_source()
File "/home/pi/adsb-receiver/build/abovetustin/AboveTustin/datasource.py", line 33, in get_map_source
return get_driver()['map'](g_map_url)
File "/home/pi/adsb-receiver/build/abovetustin/AboveTustin/screenshot.py", line 53, in __init__
self.loadmap()
File "/home/pi/adsb-receiver/build/abovetustin/AboveTustin/screenshot.py", line 95, in loadmap
browser = webdriver.Firefox(desired_capabilities={'firefox.page.settings.resourceTimeout': '20000'})
File "/home/pi/.local/lib/python3.7/site-packages/selenium/webdriver/firefox/webdriver.py", line 191, in __init__
self.binary, timeout)
File "/home/pi/.local/lib/python3.7/site-packages/selenium/webdriver/firefox/extension_connection.py", line 52, in __init__
self.binary.launch_browser(self.profile, timeout=timeout)
File "/home/pi/.local/lib/python3.7/site-packages/selenium/webdriver/firefox/firefox_binary.py", line 73, in launch_browser
self._wait_until_connectable(timeout=timeout)
File "/home/pi/.local/lib/python3.7/site-packages/selenium/webdriver/firefox/firefox_binary.py", line 104, in _wait_until_connectable
"The browser appears to have exited "
selenium.common.exceptions.WebDriverException: Message: The browser appears to have exited before we could connect. If you specified a log_file in the FirefoxBinary constructor, check it for details.
***** AboveTustin exited 2020-05-18 12:58:39.978755925+00:00
Any ideas on how to fix this and get the Twitter bot up and running properly?
anhadjangra commented
I've tried troubleshooting it by changing from Firefox to Chrome and adding the following in screenshot.py
:
from pyvirtualdisplay import Display
display = Display(visible=0, size=(1280, 720))
display.start()
browser= webdriver.Chrome('executable_path=/path/to/chromedriver/')
And now when I run ./run_tracker.sh
the output I get every second is:
Now: yyyy-mm-dd hh:mm:ss.ms
But no actual post to Twitter. Anyone got any ideas?