Hi All, I've started working with Mezzanine/Cartridge few weeks ago and they are very interesting projects for me. My testing app is deployed on Openshift (character_set_database in MySQL is utf8 )
And I faced with the following issue. When a product contains non ascii symbols (but URL is translitirated) I can open the Product in the shop but I can not Buy it because of an exception Traceback: File "/var/lib/openshift/52d044ace0b8cdfcd400021b/python/virtenv/lib/python2.7/site-packages/Django-1.6.1-py2.7.egg/django/core/handlers/base.py" in get_response 107. response = middleware_method(request, callback, callback_args, callback_kwargs) File "/var/lib/openshift/52d044ace0b8cdfcd400021b/python/virtenv/lib/python2.7/site-packages/Mezzanine-3.0.4-py2.7.egg/mezzanine/pages/middleware.py" in process_view 78. response = view_func(request, *view_args, **view_kwargs) File "/var/lib/openshift/52d044ace0b8cdfcd400021b/python/virtenv/lib/python2.7/site-packages/Cartridge-0.9.1-py2.7.egg/cartridge/shop/views.py" in product 61. request.cart.add_item(add_product_form.variation, quantity) File "/var/lib/openshift/52d044ace0b8cdfcd400021b/python/virtenv/lib/python2.7/site-packages/Cartridge-0.9.1-py2.7.egg/cartridge/shop/utils.py" in add_item 52. cart.add_item(*args, **kwargs) File "/var/lib/openshift/52d044ace0b8cdfcd400021b/python/virtenv/lib/python2.7/site-packages/Cartridge-0.9.1-py2.7.egg/cartridge/shop/models.py" in add_item 567. item.save() File "/var/lib/openshift/52d044ace0b8cdfcd400021b/python/virtenv/lib/python2.7/site-packages/Cartridge-0.9.1-py2.7.egg/cartridge/shop/models.py" in save 650. super(SelectedProduct, self).save(*args, **kwargs) File "/var/lib/openshift/52d044ace0b8cdfcd400021b/python/virtenv/lib/python2.7/site-packages/Django-1.6.1-py2.7.egg/django/db/models/base.py" in save 545. force_update=force_update, update_fields=update_fields) File "/var/lib/openshift/52d044ace0b8cdfcd400021b/python/virtenv/lib/python2.7/site-packages/Django-1.6.1-py2.7.egg/django/db/models/base.py" in save_base 573. updated = self._save_table(raw, cls, force_insert, force_update, using, update_fields) File "/var/lib/openshift/52d044ace0b8cdfcd400021b/python/virtenv/lib/python2.7/site-packages/Django-1.6.1-py2.7.egg/django/db/models/base.py" in _save_table 635. forced_update) File "/var/lib/openshift/52d044ace0b8cdfcd400021b/python/virtenv/lib/python2.7/site-packages/Django-1.6.1-py2.7.egg/django/db/models/base.py" in _do_update 679. return filtered._update(values) > 0 File "/var/lib/openshift/52d044ace0b8cdfcd400021b/python/virtenv/lib/python2.7/site-packages/Django-1.6.1-py2.7.egg/django/db/models/query.py" in _update 507. return query.get_compiler(self.db).execute_sql(None) File "/var/lib/openshift/52d044ace0b8cdfcd400021b/python/virtenv/lib/python2.7/site-packages/Django-1.6.1-py2.7.egg/django/db/models/sql/compiler.py" in execute_sql 975. cursor = super(SQLUpdateCompiler, self).execute_sql(result_type) File "/var/lib/openshift/52d044ace0b8cdfcd400021b/python/virtenv/lib/python2.7/site-packages/Django-1.6.1-py2.7.egg/django/db/models/sql/compiler.py" in execute_sql 781. cursor.execute(sql, params) File "/var/lib/openshift/52d044ace0b8cdfcd400021b/python/virtenv/lib/python2.7/site-packages/Django-1.6.1-py2.7.egg/django/db/backends/util.py" in execute 69. return super(CursorDebugWrapper, self).execute(sql, params) File "/var/lib/openshift/52d044ace0b8cdfcd400021b/python/virtenv/lib/python2.7/site-packages/Django-1.6.1-py2.7.egg/django/db/backends/util.py" in execute 53. return self.cursor.execute(sql, params) File "/var/lib/openshift/52d044ace0b8cdfcd400021b/python/virtenv/lib/python2.7/site-packages/Django-1.6.1-py2.7.egg/django/db/backends/mysql/base.py" in execute 124. return self.cursor.execute(query, args) File "/opt/rh/python27/root/usr/lib64/python2.7/site-packages/MySQLdb/cursors.py" in execute 159. query = query % db.literal(args) File "/opt/rh/python27/root/usr/lib64/python2.7/site-packages/MySQLdb/connections.py" in literal 264. return self.escape(o, self.encoders) File "/opt/rh/python27/root/usr/lib64/python2.7/site-packages/MySQLdb/connections.py" in string_literal 197. return db.string_literal(obj) Exception Type: UnicodeEncodeError at /shop/product/noski-multik/ Exception Value: 'ascii' codec can't encode characters in position 0-4: ordinal not in range(128) Is it known issue? -- You received this message because you are subscribed to the Google Groups "Mezzanine 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.
