This is sort of a bug, sort of a feature.  I just converted to the JSON 
version of AppConfig (in the gluon/contrib) and discovered the strings it 
produces are all unicode -- even in Python 2.x environments.

I'm not sure of ALL of the ramifications, but I discovered it causes crypt 
fields to fail when a key is provided.  I'm using a known key because I 
need to keep compatibility with past users who have accounts, but as soon 
as I tried to use the crypt field to enter the first logon when 
initializing the new website, it failed. It tested the "digest_alg" to see 
if it was a "str" and failed because it was "unicode".

Anyway, the workaround is to use "str()" on any fields that are critical. 
 Longer term, it may be useful for the maintainer of AppConfig to return 
strings instead of unicode from JSON format files.

-- Joe

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
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 web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to