You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I compile this example with cython>=0.28.0 and run is with Python 2.7.14 I get the following error:
Python 2.7.14 (v2.7.14:84471935ed, Sep 16 2017, 20:25:58) [MSC v.1500 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import crash
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "crash.pyx", line 3, in init crash
'%s%s' % ('15', deg)
UnicodeEncodeError: 'ascii' codec can't encode character u'\xb0' in position 0: ordinal not in range(128)
Using cython==0.27.3 there is no such error and the example works fine.
By looking at the code it seems the "PyObject_Str" statement causes the problem. However I have no idea how to fix the issue except for using cython 0.27.3 for python 2.7.