[yt-users] Import error: undefined PyUnicodeUCS2_FromUnicode

Matthew Turk matthewturk at gmail.com
Fri Jan 28 07:44:51 PST 2011


Hi Shankar,

This is a classic error that shows up when your Python interpreter and
your site-packages are compiled with different unicode on/off values.
Usually it means that you're running wiht a different python
interpreter than you mean to -- could you verify that the Python
interpreter you're calling in the queue is the correct one?  (It also
looks like h5py is not being picked up, which I suspect is related to
this issue.)

One thing to do is to submit the queue script with an explicit path:

/u/ac/sagarwal/software/enzo/src/yt/doc/yt-x86_64/bin/python2.6 hop_yt.py

Another would be to make sure you're using -V as an option in your
qsub script.  If you're not using this, the queue system might
override your PATH and PYTHONPATH environment variables in an odd way.

-Matt

On Fri, Jan 28, 2011 at 10:41 AM, Agarwal, Shankar <sagarwal at ku.edu> wrote:
> Hi,
>
> I am having a strange problem on Ember. When I try to run my python scripts interactively, they run fine. But when I submit them to a queue, I get the following error:
>
> set_SCR: using existing PBS job directory /scratch/batch/25508
> set_SCR: using existing PBS job directory /scratch/batch/25508
> yt.lagos   WARNING    2011-01-28 09:18:12,423 No h5py. Data serialization disabled.
> Traceback (most recent call last):
>  File "hop_yt.py", line 7, in <module>
>    from yt.mods import *
>  File "/gpfs1/u/ac/sagarwal/software/enzo/src/yt/yt/mods.py", line 32, in <module>
>    import yt.lagos as lagos
>  File "/gpfs1/u/ac/sagarwal/software/enzo/src/yt/yt/lagos/__init__.py", line 47, in <module>
>    from yt.arraytypes import *
>  File "/gpfs1/u/ac/sagarwal/software/enzo/src/yt/yt/arraytypes.py", line 30, in <module>
>    import numpy as na
>  File "/u/ac/sagarwal/software/enzo/src/yt/doc/yt-x86_64/lib/python2.6/site-packages/numpy/__init__.py", line 130, in <module>
>    import add_newdocs
>  File "/u/ac/sagarwal/software/enzo/src/yt/doc/yt-x86_64/lib/python2.6/site-packages/numpy/add_newdocs.py", line 9, in <module>
>    from lib import add_newdoc
>  File "/u/ac/sagarwal/software/enzo/src/yt/doc/yt-x86_64/lib/python2.6/site-packages/numpy/lib/__init__.py", line 4, in <module>
>    from type_check import *
>  File "/u/ac/sagarwal/software/enzo/src/yt/doc/yt-x86_64/lib/python2.6/site-packages/numpy/lib/type_check.py", line 8, in <module>
>    import numpy.core.numeric as _nx
>  File "/u/ac/sagarwal/software/enzo/src/yt/doc/yt-x86_64/lib/python2.6/site-packages/numpy/core/__init__.py", line 5, in <module>
>    import multiarray
> ImportError: /u/ac/sagarwal/software/enzo/src/yt/doc/yt-x86_64/lib/python2.6/site-packages/numpy/core/multiarray.so: undefined symbol: PyUnicodeUCS2_FromUnicode
>
>
>
> My PATH is :
> /u/ac/sagarwal/software/enzo/src/yt/doc/yt-x86_64/bin:/usr/apps/math/gsl/intel/1.14/bin:/blahblah.....
>
> PYTHONPATH :
> /u/ac/sagarwal/software/enzo/src/yt/doc/yt-x86_64/lib/python2.6/site-packages
>
> LD_LIBRARY_PATH :
> /u/ac/sagarwal/software/enzo/src/yt/doc/yt-x86_64/lib:/usr/apps/math/gsl/intel/1.14/lib:/usr/local/lib64:/lib:/lib64:/usr/lib64:/usr/lib:/usr/X11R6/lib64:/blahblah...
>
>
>
> My script :
>
> from yt.mods import *
> import yt.extensions.HaloProfiler as HP
> from yt.extensions.HaloMassFcn import *
>
> fn = "RedshiftOutput0001"
> pf = load(fn)
> halos = HaloFinder(pf,160,padding=0.02)
> halos.write_out("HopAnalysis.out")
>
> pc = PlotCollection(pf,center=[0.5,0.5,0.5])
> for ax in range(3):
>  p = pc.add_slice("Density", ax)
> pc.save()
>
>
> Any suggestions.
> Shankar
> _______________________________________________
> yt-users mailing list
> yt-users at lists.spacepope.org
> http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
>



More information about the yt-users mailing list