I found some solution... it isn't the best one, but it works...
The problem is with using pickle on GAE. The best solution would be to
overload/rewrite the add_font() function where for GAE, in such a way, that
it would write to a datastore instead of a filesystem. Additionaly
ValueError: insecure string pickle error can still occur, I tried b64
encoding according to
this<http://stackoverflow.com/questions/2963602/gae-valueerror-insecure-string-pickle>.
But still I get errors. So my solution is to overload add_font() function
with commented out/deleted parts:
if os.path.exists(unifilename):
fh = open(unifilename)
try:
font_dict = pickle.load(fh)
finally:
fh.close()
else:
and
try:
fh = open(unifilename, "w")
pickle.dump(font_dict, fh)
fh.close()
except IOError, e:
if not e.errno == errno.EACCES:
raise # Not a permission error.
Because of this the function every time calculates little bit more instead
of just reading data from the pickle... but it works on GAE.
Once again thanks for help Christian!
--
---
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.