views:

94

answers:

2

I'm trying to store some data in a binary file:

import os, pickle

o = some_object()
file = open('test', 'wb') #this causes the error
pickle.dump(o, file)
file.close()

I get this error: IOError: invalid mode: wb

It doesn't work (neither on test server or GAE itself), apparantly because it does't have the write permission.

How can I create files on Appengine?

+1  A: 

I think the short answer is you shouldn't. I suggest you store this info in BigTable as a Blob and serve it up that way.

slf
+5  A: 

GAE is readonly, you can only store stuff in the datastore

here is a link to the docs

gnibbler
That's what I was afraid of. thanks for saving me time, though. :)
Ali Shabdar