[wingide-users] Debugger fails on SWIG-generated module

Markus Meyer meyer at mesw.de
Wed Apr 12 04:00:11 EDT 2006


Hi everyone,

I have a certain SWIG-generated module (wrapper around C++ library)
which works fine when run within Python, but fails when it is used
within a program debugged by Wing IDE Professional (Normally I use
Version 2.0.4-1 on Windows 2000, but it also happens in the newest beta
2.1.0-b1 with all patches applied). For example, consider the following
interactive Python session:

C:\>python
Python 2.4.2 (#67, Sep 28 2005, 12:41:11) [MSC v.1310 32 bit (Intel)] on
win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import pllib
>>> line = pllib.CPolyline()
>>> line
<pllib.CPolyline; proxy of C++ CPolyline instance at _e0c89400_p_CPolyline>
>>>

This is how it is supposed to work. However, when I write the same
commands into a file and execute it within the Wing IDE debugger, the
following error message is shown while executing "line = pllib.CPolyline()":

AttributeError: thisown

Rückverfolgung (innerste zuletzt):

Datei "c:\Dokumente und Einstellungen\Markus Meyer\Anwendungsdaten\Wing
IDE 2\untitled-2.py", Zeile 1, in ?
  from pllib import CPolyline
Datei "c:\Dokumente und Einstellungen\Markus Meyer\Anwendungsdaten\Wing
IDE 2\untitled-2.py", Zeile 2, in ?
  line = CPolyline()
Datei "c:\Python24\Lib\pllib.py", Zeile 392, in __init__
  _swig_setattr(self, CPolyline, 'this', _pllib.new_CPolyline(*args))
Datei "c:\Python24\Lib\pllib.py", Zeile 507, in __init__
  if not hasattr(self,"thisown"): _swig_setattr(self, CPolyline,
'thisown', 0)
Datei "c:\Python24\Lib\pllib.py", Zeile 388, in <lambda>
  __getattr__ = lambda self, name: _swig_getattr(self, CPolyline, name)
Datei "c:\Python24\Lib\pllib.py", Zeile 27, in _swig_getattr
  raise AttributeError,name

The file pllib.py was created by SWIG. What could be the cause of this?
I can provide the module and associated DLLs to Wing Support stuff if
necessary (it is not Free Software but not a terrible secret either).


Markus



More information about the wingide-users mailing list