Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unicode strings with non-ASCII characters cause UnicodeEncodeError #129

Closed
obi1kenobi opened this issue Oct 21, 2015 · 0 comments
Closed

Comments

@obi1kenobi
Copy link
Contributor

Repro: use the testcase in #128 and add '\u2603' (unicode snowman) to the end of the unicode argument. Observe the following output:

======================================================================
ERROR: testUnicode (tests.test_ogm.OGMUnicodeTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/predrag/Code/pyorient/tests/test_ogm.py", line 327, in testUnicode
    g.unicode.create(name=name, value=value)
  File "/Users/predrag/Code/pyorient/pyorient/ogm/broker.py", line 53, in create
    return self.g.create_vertex(self.element_cls, **kwargs)
  File "/Users/predrag/Code/pyorient/pyorient/ogm/graph.py", line 272, in create_vertex
    for k,v in db_props.items()))
  File "/Users/predrag/Code/pyorient/pyorient/ogm/graph.py", line 272, in <genexpr>
    for k,v in db_props.items()))
UnicodeEncodeError: 'ascii' codec can't encode character u'\u2603' in position 0: ordinal not in range(128)

----------------------------------------------------------------------
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants