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

apache2_mod_wsgi and unicode byte representation #80

Closed
abdallah opened this Issue Mar 27, 2014 · 3 comments

Comments

Projects
None yet
2 participants
@abdallah

abdallah commented Mar 27, 2014

When trying to load a django project using Apache Mod_WSGI I get the following error:
ImportError: /home/codio/.parts/packages/python2/2.7.6/lib/python2.7/lib-dynload/_io.so: undefined symbol: PyUnicodeUCS2_Replace

The error is explained:

You are using a version of Python that uses a 4-byte representation for Unicode characters, but some C extension module you are importing was compiled using a Python that uses a 2-byte representation for Unicode characters (the default).

The only way to solve this problem is to use extension modules compiled with a Python binary built using the same size for Unicode characters.

Note that loading the module manually works, so the error is directly related to the apache2_mod_wsgi installed using 'parts'. Would you guys be able to fix this or propose a workaround?

Here's a writeup of what I was doing: http://deeb.me/20140324/django-on-codio

@MaximKraev

This comment has been minimized.

Show comment
Hide comment
@MaximKraev

MaximKraev Mar 30, 2014

Member

default ubuntu python is compiled with 4 byte unicode, try to install python from parts parts install python2 restart the console and restart apache, parts python is compiled with 2 byte unicode

ᐅ curl localhost:3000/main.wsgi                                                                            
UCS2 build%          

please confirm that it is working for you.

Member

MaximKraev commented Mar 30, 2014

default ubuntu python is compiled with 4 byte unicode, try to install python from parts parts install python2 restart the console and restart apache, parts python is compiled with 2 byte unicode

ᐅ curl localhost:3000/main.wsgi                                                                            
UCS2 build%          

please confirm that it is working for you.

@MaximKraev

This comment has been minimized.

Show comment
Hide comment
@MaximKraev

MaximKraev Apr 14, 2014

Member

Closing, feel free to reopen if it is not working

Member

MaximKraev commented Apr 14, 2014

Closing, feel free to reopen if it is not working

@MaximKraev MaximKraev closed this Apr 14, 2014

@abdallah

This comment has been minimized.

Show comment
Hide comment
@abdallah

abdallah Apr 14, 2014

sorry for late reply.
issue resolved.

abdallah commented Apr 14, 2014

sorry for late reply.
issue resolved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment