[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.python

Pyrex bitten by the exception bug

Paul Sijben

2/1/2008 3:01:00 PM

I am running into the (apparently) well-known issue with pyrex that
trying to raise an exception using python2.5 and pyrex will lead to a
TypeError, as "TypeError: exceptions must be strings, classes, or
instances, not exceptions.ImportError"

Is there a fixc for this issue?

best regards,

Paul Sijben
3 Answers

Bearophile

2/1/2008 5:14:00 PM

0

Paul Sijben:
> Is there a fixc for this issue?

At the moment I think it's better to drop Pyrex and to use Cython.
Maybe you can try that, or ask to their developers.

Bye,
bearophile

Stefan Behnel

2/1/2008 5:27:00 PM

0

Paul Sijben wrote:
> I am running into the (apparently) well-known issue with pyrex that
> trying to raise an exception using python2.5 and pyrex will lead to a
> TypeError, as "TypeError: exceptions must be strings, classes, or
> instances, not exceptions.ImportError"

You should use a recent Pyrex version. But using Cython is a better idea anyway.

Stefan

Paul Sijben

2/1/2008 6:29:00 PM

0

Stefan Behnel wrote:
> Paul Sijben wrote:
>> I am running into the (apparently) well-known issue with pyrex that
>> trying to raise an exception using python2.5 and pyrex will lead to a
>> TypeError, as "TypeError: exceptions must be strings, classes, or
>> instances, not exceptions.ImportError"
>
> You should use a recent Pyrex version.

I have :-( the most recent from their site


>But using Cython is a better idea anyway.
>

I will look into that. Thanks,

Paul

> Stefan