Pierre-Henri WUILLEMIN
2015-11-02 15:23:22 UTC
Dear all,
I am wrapping a quite large C++ library in python (2 and 3) using swig 3.0.7.
I just checked today what would happen when using the current swig 3.0.8
version in branch master . And I found a big problem !
The very same code/*.i files that are correct and usable with swig 3.0.7 now
generate error when running python code that uses the wrappers ...
The prototype of errors is
Traceback (most recent call last):
File "TestSuite.py", line 69, in testLocalSearchWithTabuAccurate
.../...
File "build/wrappers/project/project.py", line 6210, in __init__
self.this.append(this)
File "build/wrappers/project/project.py", line 6195, in <lambda>
__getattr__ = lambda self, name: _swig_getattr(self, myClass, name)
File "build/wrappers/project/project.py", line 81, in _swig_getattr
return _swig_getattr_nondynamic(self, class_type, name, 0)
File "build/wrappers/project/project.py", line 76, in
_swig_getattr_nondynamic
return object.__getattr__(self, name)
AttributeError: type object 'object' has no attribute '__getattr__'
I have errors of that kind for many (if not all) __init_ of wrappers. For
now I can only see that many (if not all)
try:
self.this.append(this)
except:
self.this=this
became
try:
self.this.append(this)
except Exception:
self.this=this
in the new generated python code for the library... which explains nothing, I
guess ...
I will try to investigate the reason of these errors. But if anyone could give
me any clue about what has changed that could explained why all the
constructors of my wrapped classes seem to be bugged in 3.0.8 and not in
3.0.7, I would be very grateful :-)
Best regards,
I am wrapping a quite large C++ library in python (2 and 3) using swig 3.0.7.
I just checked today what would happen when using the current swig 3.0.8
version in branch master . And I found a big problem !
The very same code/*.i files that are correct and usable with swig 3.0.7 now
generate error when running python code that uses the wrappers ...
The prototype of errors is
Traceback (most recent call last):
File "TestSuite.py", line 69, in testLocalSearchWithTabuAccurate
.../...
File "build/wrappers/project/project.py", line 6210, in __init__
self.this.append(this)
File "build/wrappers/project/project.py", line 6195, in <lambda>
__getattr__ = lambda self, name: _swig_getattr(self, myClass, name)
File "build/wrappers/project/project.py", line 81, in _swig_getattr
return _swig_getattr_nondynamic(self, class_type, name, 0)
File "build/wrappers/project/project.py", line 76, in
_swig_getattr_nondynamic
return object.__getattr__(self, name)
AttributeError: type object 'object' has no attribute '__getattr__'
I have errors of that kind for many (if not all) __init_ of wrappers. For
now I can only see that many (if not all)
try:
self.this.append(this)
except:
self.this=this
became
try:
self.this.append(this)
except Exception:
self.this=this
in the new generated python code for the library... which explains nothing, I
guess ...
I will try to investigate the reason of these errors. But if anyone could give
me any clue about what has changed that could explained why all the
constructors of my wrapped classes seem to be bugged in 3.0.8 and not in
3.0.7, I would be very grateful :-)
Best regards,
--
Associate Professor - Maître de conférences
Office 403/26-00 | BC 169 | 4, place Jussieu | 75252 Paris Cedex 05
gpg : http://webia.lip6.fr/~phw/phw.asc
phone : +33 1 44 27 71 48 | fax : +33 1 44 27 88 89
Associate Professor - Maître de conférences
Office 403/26-00 | BC 169 | 4, place Jussieu | 75252 Paris Cedex 05
gpg : http://webia.lip6.fr/~phw/phw.asc
phone : +33 1 44 27 71 48 | fax : +33 1 44 27 88 89