charlax charlax - 10 months ago 59
Python Question

IOError: [Errno 13] file not accessible with Google AppEngine 1.6.1

Maybe it's a bug, but I'm posting here anyway.

I get the following issue on my local AppEngine testing server:

WARNING 2012-01-10 06:08:40,336] The rdbms API is not available because the MySQLdb library could not be loaded.
INFO 2012-01-10 06:08:40,470] Server:
INFO 2012-01-10 06:08:40,474] Checking for updates to the SDK.
INFO 2012-01-10 06:08:40,990] Update check failed: HTTP Error 404: Not Found
WARNING 2012-01-10 06:08:47,643] Could not initialize images API; you are likely missing the Python "PIL" module. ImportError: No module named _imaging
INFO 2012-01-10 06:08:47,654] Running application dev~project_name on port 8080: http://localhost:8080
INFO 2012-01-10 06:08:47,654] Admin console is available at: http://localhost:8080/_ah/admin
INFO 2012-01-10 06:09:14,989] Created 2 and deleted 0 index(es); total 2
WARNING 2012-01-10 06:09:15,480] Can't open zipfile /Users/ca/.pythonbrew/venvs/Python-2.7.2/project_name/lib/python2.7/site-packages/setuptools-0.6c11-py2.7.egg: IOError: [Errno 13] file not accessible: '/Users/ca/.pythonbrew/venvs/Python-2.7.2/project_name/lib/python2.7/site-packages/setuptools-0.6c11-py2.7.egg'
ERROR 2012-01-10 06:09:16,927] Traceback (most recent call last):
File "/Users/ca/Dropbox/Perso/projects/project_name/Source/project_name/lib/", line 735, in _handle
File "/Users/ca/Dropbox/Perso/projects/project_name/Source/project_name/lib/", line 1451, in wrapper
rv = callback(*a, **ka)
File "/Users/ca/Dropbox/Perso/projects/project_name/Source/project_name/", line 41, in render_to_response
template = jinja_env.get_template(template_name)
File "/Users/ca/.pythonbrew/venvs/Python-2.7.2/project_name/lib/python2.7/site-packages/jinja2/", line 719, in get_template
File "/Users/ca/.pythonbrew/venvs/Python-2.7.2/project_name/lib/python2.7/site-packages/jinja2/", line 693, in _load_template
File "/Users/ca/.pythonbrew/venvs/Python-2.7.2/project_name/lib/python2.7/site-packages/jinja2/", line 115, in load
File "/Users/ca/.pythonbrew/venvs/Python-2.7.2/project_name/lib/python2.7/site-packages/jinja2/", line 165, in get_source
File "/Users/ca/.pythonbrew/venvs/Python-2.7.2/project_name/lib/python2.7/site-packages/jinja2/", line 224, in open_if_exists
File "/Applications/", line 578, in __init__
raise IOError(errno.EACCES, 'file not accessible', filename)
IOError: [Errno 13] file not accessible: '/Users/ca/Dropbox/Perso/Projects/project_name/Source/project_name/templates/tools_list.html'

INFO 2012-01-10 06:09:16,962] "GET / HTTP/1.1" 500 -
INFO 2012-01-10 06:09:16,974] Updating /Users/ca/Dropbox/Perso/projects/project_name/Source/project_name/index.yaml
WARNING 2012-01-10 06:11:36,153] Can't open zipfile /Users/ca/.pythonbrew/venvs/Python-2.7.2/project_name/lib/python2.7/site-packages/setuptools-0.6c11-py2.7.egg: IOError: [Errno 13] file not accessible: '/Users/ca/.pythonbrew/venvs/Python-2.7.2/project_name/lib/python2.7/site-packages/setuptools-0.6c11-py2.7.egg'

I may be wrong, but it seems that it's an issue I was not getting before. Since Google App Engine was released on December 13, 2011; I'm wondering if it could come from this version.

I'm using pythonbrew, virtualenv, Mac Os X 10.6.8

Thanks for your help!


Instead of referencing my variable using a hardcoded path variable, I'm now using:

PROJECT_DIR = os.path.dirname(__file__)

And it's working. I'll let you know if the issue comes back (I saw some articles describing it as being randomly recurrent).

I also applied the patch in comment 29 on