1

I Have a test app that is configured python25 that opens a text fie in the root folder and is then loaded by cPickle. the code is based on gae-nltk I have migrated the code to python27 and i get the following error in log console of development kit using the latest sdk v1.7.0 timestamp: 1337717865 api_versions: ['1']

File "C:\Program Files\Google\google_appengine\lib\webapp2\webapp2.py", line 570, in   dispatch
return method(*args, **kwargs)
File "C:\APPS\v2\knol_handlers.py", line 267, in get
kwds1 = Reply(tb1)
File "C:\APPS\v2\knol_handlers.py", line 108, in Reply
tok = pickle.load(open(os.path.join(os.path.dirname(__file__), "site-packages\\english.pickle")))
File "C:\Program Files\Google\google_appengine\google\appengine\tools\dev_appserver_import_hook.py", line 592, in __init__
raise IOError(errno.EACCES, 'file not accessible', filename)
IOError: [Errno 13] file not accessible: 'C:\\APPS\\v2\\site-packages\\english.pickle

I have looked into configuration docs for python27 but I guess i am missing something. Any help appreciated. murray3

UPDATE = The file was available to be read when I moved it from root to subfolder site-packages. I upgraded to sdk version 1.7.0 and the file acess problem has resurfaced. the file is not marked as static in app.yaml

murray3
  • 71
  • 1
  • 8
  • See this answer http://stackoverflow.com/questions/2630205/read-a-file-on-app-engine-with-python. Probably you marked the file as static. – Sebastian Kreft Jun 21 '12 at 17:22
  • thanks skreft for the mind nudge, I created a site-packages subfolder in root, put the english.pickle file in there and it can now access it. I hadn't marked it as static in app.yaml Also I tried to make the folder name '\data' and it still wouldn't allow access so I tried site-packages and it done the trick, need to investigate the reasons further? – murray3 Jun 21 '12 at 22:21
  • problem has resurfaced with upgrade to latest gae python sdk – murray3 Jul 01 '12 at 22:35
  • can you update your comment with your current project structure and please reformat the traceback. – Sebastian Kreft Jul 01 '12 at 23:40
  • the english.pickle file is now in a sub folder of root called \site-packages – murray3 Jul 02 '12 at 09:58

1 Answers1

0

OK lesson learned - be careful using so called boiler plate templates. there was a reference in app.yaml that would include this as static. I reverted to a basic app.yaml and problem is gone.

murray3
  • 71
  • 1
  • 8