Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I have made an auto re run .sh file. #33

Open
Divyam10 opened this issue Oct 1, 2020 · 5 comments
Open

I have made an auto re run .sh file. #33

Divyam10 opened this issue Oct 1, 2020 · 5 comments

Comments

@Divyam10
Copy link

Divyam10 commented Oct 1, 2020

So sometimes it crashes due to selector issues.
Works fine if I re run it fo that I made this .sh file to re run might be helpful for other people

#!/bin/bash    
t=1
while [ $t -ne 0]
do
   python3 auto_joniner.py
   t=$?
done

Then just :
chmod +x autorun.sh
./autorun.sh

So you don't have to worry about the unexpected crashes!

@TobiasPankner
Copy link
Owner

What kind of selector issues are these? Maybe I can fix them

@Divyam10
Copy link
Author

Divyam10 commented Oct 1, 2020

Traceback (most recent call last):
File "auto_joiner.py", line 585, in
main()
File "auto_joiner.py", line 558, in main
members = get_meeting_members()
File "auto_joiner.py", line 416, in get_meeting_members
browser.execute_script("document.getElementById('roster-button').click()")
File "/home/ai/.local/lib/python3.6/site-packages/selenium/webdriver/remote/webdriver.py", line 636, in execute_script
'args': converted_args})['value']
File "/home/ai/.local/lib/python3.6/site-packages/selenium/webdriver/remote/webdriver.py", line 321, in execute
self.error_handler.check_response(response)
File "/home/ai/.local/lib/python3.6/site-packages/selenium/webdriver/remote/errorhandler.py", line 242, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.JavascriptException: Message: javascript error: Cannot read property 'click' of null
(Session info: chrome=85.0.4183.83)

I kind of get this and one more usual one I will post it as soon i come across it again

@TobiasPankner
Copy link
Owner

Okay, I'll take a look at this later

@prokan468
Copy link

prokan468 commented Dec 7, 2020

I have the same issue... within 10-11 minutes of the run, the code gets aborted with the following output

File "C:\Users\k\Downloads\Teams-Auto-Joiner-master\Teams-Auto-Joiner-master\auto_joiner.py", line 636, in <module>
    main()
  File "C:\Users\k\Downloads\Teams-Auto-Joiner-master\Teams-Auto-Joiner-master\auto_joiner.py", line 591, in main
    switch_to_calendar_tab()
  File "C:\Users\k\Downloads\Teams-Auto-Joiner-master\Teams-Auto-Joiner-master\auto_joiner.py", line 209, in switch_to_calendar_tab
    calendar_button = wait_until_found("button.app-bar-link > ng-include > svg.icons-calendar", 5)
  File "C:\Users\k\Downloads\Teams-Auto-Joiner-master\Teams-Auto-Joiner-master\auto_joiner.py", line 193, in wait_until_found
    WebDriverWait(browser, timeout).until(element_present)
  File "C:\Users\k\AppData\Local\Programs\Python\Python39\lib\site-packages\selenium\webdriver\support\wait.py", line 71, in until
    value = method(self._driver)
  File "C:\Users\k\AppData\Local\Programs\Python\Python39\lib\site-packages\selenium\webdriver\support\expected_conditions.py", line 128, in __call__
    return _element_if_visible(_find_element(driver, self.locator))
  File "C:\Users\k\AppData\Local\Programs\Python\Python39\lib\site-packages\selenium\webdriver\support\expected_conditions.py", line 415, in _find_element
    raise e
  File "C:\Users\k\AppData\Local\Programs\Python\Python39\lib\site-packages\selenium\webdriver\support\expected_conditions.py", line 411, in _find_element
    return driver.find_element(*by)
  File "C:\Users\k\AppData\Local\Programs\Python\Python39\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 976, in find_element
    return self.execute(Command.FIND_ELEMENT, {
  File "C:\Users\k\AppData\Local\Programs\Python\Python39\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 321, in execute
    self.error_handler.check_response(response)
  File "C:\Users\k\AppData\Local\Programs\Python\Python39\lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 242, in check_response
    raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.WebDriverException: Message: chrome not reachable
  (Session info: chrome=86.0.4240.198)

Please do tell what to do

@prokan468
Copy link

Btw for the windows users, if you are having the same issue, you can rerun the python file with this code:-

:loop
auto_joiner.py
goto loop

Feel free to use it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants