Massimo, You're correct that, though a better approach, switching to
os.path.join() didn't have any effect.

According to appcfg.py, my files are uploaded:

   2010-02-20 12:20:39,608 INFO appcfg.py:1426 Processing file
'applications/canyonezt/static/COMP_profile.xml'

And I confirmed that with wget (wget
http://1-0-test2.latest.canyonezt.appspot.com/canyonezt/static/COMP_profile.xml)...
it returns my file as expected. So, the file exists.

For all who care, the GAE documentation (http://code.google.com/
appengine/docs/whatisgoogleappengine.html) clearly states you *can*
read but not write:

   An application cannot write to the file system. An app can read
files, but only files uploaded with the application
   code. The app must use the App Engine datastore, memcache or other
services for all data that persists
   between requests.

Out of curiosity, I emitted os.listdir('.') output to logging.debug()
to see what was to be seen. It showed what one would expect, including
the the applications directory. But os.listdir('./applications') shows
no output. I then moved my file to the the root directory of the GAE
application and, voila, I can read the file. So, it seems we can read
from the current working directory of the GAE process, but not its
subdirectories. This limitation does not appear to be imposed by
dev_appserver.py: it only shows up when you upload to production GAE.
Very strange.

Well, I'm off to the GAE user group. Thx, TonyR

============================================

As a side note, while researching whether my files were uploaded
above, I noticed that appcfg.py seems not to respect
"(applications/.*?/databases/.*)" in app.yaml. Here's some appcfg.py
output demonstrating that fact:

   2010-02-20 12:21:01,092 INFO appcfg.py:1426 Processing file
'applications/canyonezt/databases/
c8b669d15150d7109e5f7ab36744a5b7_auth_user.table'
   2010-02-20 12:21:01,108 INFO appcfg.py:1426 Processing file
'applications/canyonezt/databases/
c8b669d15150d7109e5f7ab36744a5b7_auth_group.table'
   2010-02-20 12:21:01,125 INFO appcfg.py:1426 Processing file
'applications/canyonezt/databases/
c8b669d15150d7109e5f7ab36744a5b7_auth_membership.table'
   2010-02-20 12:21:01,140 INFO appcfg.py:1426 Processing file
'applications/canyonezt/databases/
c8b669d15150d7109e5f7ab36744a5b7_auth_permission.table'
   2010-02-20 12:21:01,155 INFO appcfg.py:1426 Processing file
'applications/canyonezt/databases/
c8b669d15150d7109e5f7ab36744a5b7_auth_event.table'

This seems odd, since it *does* respect "(applications/.*?/
sessions/.*)" in app.yaml

   2010-02-20 12:20:55,171 INFO appcfg.py:1499 Ignoring file
'applications/canyonezt/sessions/192-168-1-1-f3c819be-cf8a-4826-
ac3b-44501e56a3fe': File matches ignore regex.
   2010-02-20 12:20:55,171 INFO appcfg.py:1499 Ignoring file
'applications/canyonezt/sessions/192-168-1-1-09c93858-6160-4e5c-8b8c-
def2c55fa37f': File matches ignore regex.

It also might be worthwhile to go through all of the appcfg.py output
and add some more stuff the skip list in app.yaml. For example,
there's not much point in uploading things like the README. I'll see
if I can come up with a list later on this weekend.

-- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.

Reply via email to