kbandla / libdnet

Automatically exported from code.google.com/p/libdnet
Other
1 stars 0 forks source link

Python 2.7.3 "TypeError: exceptions must be strings, classes or instances, not type" #25

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Use the python module with Python 2.7.3
2. Do anything that will cause an exception and try to catch it

What is the expected output? What do you see instead?
  Instead of the exception being thrown and caught, it simply exits with  "TypeError: exceptions must be strings, classes or instances, not type".

Please provide any additional information below.

  This is caused by it being compiled with an old version of pyrexc. The fix is simple enough, just download libdnet from source as well as installing pyrexc. One minor issue is that the word "type" is now a reserved word, so you I just ran threw and replaced the variables named "type" with "typee" (patch attached). Run "pyrexc dnet.pyx" in the python folder and reinstalling fixes it.

Original issue reported on code.google.com by pherrico...@gmail.com on 5 Jul 2012 at 10:24

Attachments:

GoogleCodeExporter commented 9 years ago
Just a note, this happens with anything > than Python 2.5 I believe. 

- PherricOxide

Original comment by pherrico...@gmail.com on 5 Jul 2012 at 10:26

GoogleCodeExporter commented 9 years ago
Also this from pyrexc v0.9.9:
G:\MingW32\src\inet\libdnet-1.11\python\dnet.pyx:558:24:
 Warning: 'not None' will become the default in a future version of Pyrex. 
 Use 'or None' to allow passing None.

I'm lost here, but it's just a warning.

Original comment by gisle.vanem@gmail.com on 24 Jan 2013 at 3:30