Forums

Permission Denied with Selenium

Hi I've created a selenium script which runs fine locally but I get an error when I run it on PythonAnywhere:

selenium.common.exceptions.WebDriverException: Message: Permission denied to access property '__raven_wrapper__'

I believe this is something related to Firefox and I understood that was the only Webdriver available in PythonAnywhere. Can you recommend anything to go around that?

Thanks !

What version of python, what version of selenium, and what was the selenium code that errored? Can we see the full stacktrace?

Using Python 2.7 and Selenium 2.53.6 :

username_box = browser.find_element_by_name('username')
File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/remote/webdriver.py", line 365, in find_element_by_name
return self.find_element(by=By.NAME, value=name)
File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/remote/webdriver.py", line 752, in find_element
'value': value})['value']
File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/remote/webdriver.py", line 236, in execute
self.error_handler.check_response(response)
File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/remote/errorhandler.py", line 192, in 
check_response
    raise exception_class(message, screen, stacktrace)
         selenium.common.exceptions.WebDriverException: Message: Permission denied to access property 
 '__raven_wrapper__'
 Stacktrace:
at i.wrap (https://*****.com/webpack/desktop-1cf0691d0fc6f4e995db.js:80)
at i._instrumentTryCatch/</< (https://*****.com/webpack/desktop-1cf0691d0fc6f4e995db.js:80)

hmm- out of curiosity, do other browser calls work? eg: find_element_by_xpath, or a different name etc

No, unfortunately !

 File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/remote/webdriver.py", line 293, in find_element_by_xpath
return self.find_element(by=By.XPATH, value=xpath)
 File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/remote/webdriver.py", line 752, in find_element
'value': value})['value']
File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/remote/webdriver.py", line 236, in execute
self.error_handler.check_response(response)
File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/remote/errorhandler.py", line 192, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.WebDriverException: Message: Permission denied to access property '__raven_wrapper__'
Stacktrace:
at i.wrap (https://****.com/webpack/desktop-1cf0691d0fc6f4e995db.js:80)
at i._instrumentTryCatch/</< (https://****.com/webpack/desktop-1cf0691d0fc6f4e995db.js:80)

Is this for every site you access? For example, do you see it if you load Google's front page using Selenium? Or is it only on certain sites? If the latter, could you share the URL? (You can use the "Send feedback" link above to share it privately if you don't want to post the link on these public forums.)

Hi Giles ! Thanks for the reply. I was able to replicate the example you provided (the Google home page). I only ran the script on the site I want to use Selenium, I'll send you the link privately.

OK, thanks!