[Cython] Raising exceptions under python 2.5
Johannes Wienke
jwienke at techfak.uni-bielefeld.de
Mon Jul 14 15:27:06 CEST 2008
Am 07/14/2008 01:25 PM schrieb Johannes Wienke:
> Hi again,
>
> I've developed my project under python 2.4 and now I got to get it
> running under 2.5. The main problem I notice at the moment with the
> cython party is raising exceptions. Running the project I get constant
> errors of the form:
>
> Traceback (most recent call last):
> File "/tmp/shIP/test/shiptests/datatest.py", line 49, in testStartData
> self.__dataStore.addDataObserver(DataStore.START_IDENT, plugin1)
> File "data.pyx", line 535, in ship.data.DataStore.addDataObserver
> (build/temp.linux-i686-2.5/pyrex/data.c:4314)
> File "data.pyx", line 472, in ship.data.DataStore.__addToObserverDict
> (build/temp.linux-i686-2.5/pyrex/data.c:3908)
> File "data.pyx", line 558, in ship.data.DataStore.__findObserverItem
> (build/temp.linux-i686-2.5/pyrex/data.c:4478)
> TypeError: raise: exception must be an old-style class or instance
>
> The line contains:
> raise KeyError("No _ObserverItem found belonging to '%s'." % observer)
>
> I thought this is the preferred way of raising exceptions. Why is cython
> / python complaining about this?
I'm sorry, my fault, compiled against python 2.4.
- Johannes
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 260 bytes
Desc: OpenPGP digital signature
Url : http://codespeak.net/pipermail/cython-dev/attachments/20080714/49b10a1e/attachment.pgp
More information about the Cython-dev
mailing list