I tried to import mechanize module to my python script like this,
from mechanize import Browser
But, Google appengine throws HTTP 500 when accessing my script.
To make things more clear, Let me give you the snapshot of my package structure,
root
....mechanize(where all the mechanize related files there)
....main.py
....app.yaml
....image
....script
Can anyone help me out to resolve this issue?
Thanks, Ponmalar
The mechanize main page says:
My understanding is that urllib2 is one of the sandboxed modules in GAE, with its functionality being replaced by the Google-provided urlfetch. You'd need to re-implement the mechanize.UserAgentBase class to use urlfetch, if that's at all possible.
When GAE throws a 500, you can see the actual error in the logs on your admin console. If that doesn't help, paste it here and we'll help further.
Also, does it work on the dev_appserver?