Oops.. sorry, my original problem is still opened :(
I want to use my code in my webapp, not in py.
My test code :
@app.route("/devselenium", methods=["GET", "POST"])
def devselenium():
chrome_options = webdriver.ChromeOptions()
chrome_options.add_argument("--headless")
chrome_options.add_argument("--disable-gpu")
browser = webdriver.Chrome(options=chrome_options)
try:
browser.get("https://www.google.com")
except Exception as e:
print(e)
finally:
browser.quit()
And the error is comming :
There was an error loading your PythonAnywhere-hosted site. There may be a bug in your code.
Error code: Unhandled Exception
Debugging tips
The first place to look is at your web app page to ensure that there are no errors indicated there.
Next, check your site's server and error logs for any messages — you can view them here:
cyrooka.pythonanywhere.com.error.log
cyrooka.pythonanywhere.com.server.log
You can find helpful tips on the PythonAnywhere help site:
There's an ImportError in the logs
"403 Forbidden" error or "Connection Refused" error in logs
Database connection errors
There are many more helpful guides on our Help pages
If you get completely stuck, then drop us a line at support@pythonanywhere.com, in the forums, or using the "Send feedback" link on the site, with the relevant lines from your logs.
Can you please help me?