python - Flask-API Elastic Beanstalk Special Characters? -
i have flask-api (http://http://www.flaskapi.org/) application stored in elastic beanstalk environment (server: apache/2.4.10 (amazon) mod_wsgi/3.5 python/2.7.5) , have following problem special characters.
when test flask-api in local environment, information generated special characters (accents , more)
{ ... classification: "sensor posición cigueñal" id_classification: 66 ... }
but when deploy same configuration in elastic beanstalk environment connected amazon rds (information stored in rdmbs not transformed), shows this:
{ ... classification: "sensor posici�n cigue�al" id_classification: 66 ... }
if need more information application or code, let me know
some cases when not follows structure, shows:
file "/users/nestordeharo/sites/api.python.rigs/venv/lib/python2.7/site-packages/flask_api/renderers.py", line 57, in render return json.dumps(data, cls=jsonencoder, ensure_ascii=false, indent=indent) file "/system/library/frameworks/python.framework/versions/2.7/lib/python2.7/json/__init__.py", line 250, in dumps sort_keys=sort_keys, **kw).encode(obj) file "/system/library/frameworks/python.framework/versions/2.7/lib/python2.7/json/encoder.py", line 210, in encode return ''.join(chunks) unicodedecodeerror: 'ascii' codec can't decode byte 0xc3 in position 60: ordinal not in range(128)
Comments
Post a Comment