[Cython] help tracking down TypeError

Hoyt Koepke hoytak at cs.ubc.ca
Wed Nov 12 02:04:04 CET 2008


Hello,

I've got a fairly large cython module that I've just made a lot of
changes to.   It compiles fine, but when I try to import it, it just
gives this cryptic error message:


TypeError: Item in ``from list'' not a string


Here's the traceback:


In [1]: import geometry
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)

/home/hoytak/workspace/gravimetrics/spatial/<ipython console> in <module>()

/home/hoytak/workspace/gravimetrics/spatial/geometry.pyx in
spatial.geometry (spatial/geometry.c:6001)()
      2
      3
----> 4 import numpy.random as rn
      5 from copy import copy
      6

TypeError: Item in ``from list'' not a string
> /home/hoytak/workspace/gravimetrics/spatial/geometry.pyx(4)spatial.geometry (spatial/geometry.c:6001)()
      3
----> 4 import numpy.random as rn
      5 from copy import copy



I'm pretty sure that it doesn't have anything to do with the line in
question, as changing/removing it doesn't change things.  If anyone
has a clue where I should look, please let me know.  I've attached the
pyx/pxd files in question just in case.  I'm using the latest cython
version from the mercurial repo.

Thanks!!!
--Hoyt


++++++++++++++++++++++++++++++++++++++++++
+ Hoyt Koepke
+ University of Washington Department of Statistics
+ http://www.stat.washington.edu/~hoytak/
+ hoytak at gmail.com
++++++++++++++++++++++++++++++++++++++++++
-------------- next part --------------
A non-text attachment was scrubbed...
Name: geometry.tar.gz
Type: application/x-gzip
Size: 2513 bytes
Desc: not available
Url : http://codespeak.net/pipermail/cython-dev/attachments/20081111/c8dd6096/attachment-0001.bin 


More information about the Cython-dev mailing list