[BioPython] Having some issue with unicode and Bio.PDB

WONG Hua wong at ebgm.jussieu.fr
Mon Oct 3 05:21:19 EDT 2005


I am not too aware of unicode (never heard of it until I bumped on this
problem).
Lately I have been working with Bio.PDB and Blender (see blender.org) with the
idea to build some cool tools.

There is no error if I use the genuine python interpreter. But when I use the
embedded interpreter inside Blender I have the following error message when
importing Bio.PDB:
##############################################################
  File
"/users2/invites/wong/apps/lib/python2.3/site-packages/Bio/PDB/__init__.py",
line 22, in ?
    from Polypeptide import PPBuilder, CaPPBuilder, is_aa, standard_aa_names
  File
"/users2/invites/wong/apps/lib/python2.3/site-packages/Bio/PDB/Polypeptide.py",
line 5, in ?
    from Bio.Seq import Seq
  File "/users2/invites/wong/apps/lib/python2.3/site-packages/Bio/Seq.py",
line1, in ?
    import string, array
ImportError: /users2/invites/wong/apps/lib/python2.4/lib-dynload/array.so:
undefined symbol: PyUnicodeUCS2_FromUnicode
##############################################################

I found that Blender interpreter is UCS4 while my local python is UCS2...
Both are using python 2.4

I can try and recompile Blender to enable UCS2 but I would prefer to avoid this
if I can (I am not an expert in compiling things) because I don't know if it
would work afterwards...
Is there something I can modify in Bio.PDB's .py files so it can be imported
when using UCS4?

Thanks,

Hua


More information about the BioPython mailing list