0

I've run into a strange problem.

I built VTK with python wrappings on cent os 6.5. On importing vtk it gives me PyUnicodeUCS2_* error. I checked python used for the build for unicode setting with sys.maxunicode. It is UCS4. I searched for this error and found that the error occurs when the VTK is built using UCS2 python. But, This is not the case in my case. What could be the reason for error?

The python that I'm using is picked from some other machine . If I run maxunicode on original previous machine it shows USC2. The same python (I copied the whole folder python2.6) on the other machine where I'm building VTK, shows maxunicode as UCS4. I think this has something to do with the problem.

Please help.

gaj
  • 317
  • 6
  • 20

2 Answers2

0

This error is caused by using an extension built by a UCS2-based Python interpreter with a UCS4-based interpreter (or vice-versus).

If you built it using the same Python interpreter then something is confusing in your build environment.

casevh
  • 11,093
  • 1
  • 24
  • 35
0

I tried to compile VTK with my python build several times. Checked the various paths in CMAKE to avoid conflict with system python. Still couldn't get rid of the error. Finally, I built the python with --enable-unicoe=ucs2. That solved the problem. Thanks for the help though.

gaj
  • 317
  • 6
  • 20