SGL-UT / GPSTk

ATTENTION: This repository has been moved and is for archival purposes only. GPSTk toolkit has been renamed to GNSSTK and has been split into two new separate repositories. GNSSTK now only contains libraries while the other repository GNSSTK-APPS contains only applications. The rename and split into libraries and applications started with version v12.0.0 on September 2021. GPSTk --> GNSSTK at https://gitlab.com/sgl-ut/gnsstk --> GNSSTK-APPS at https://gitlab.com/sgl-ut/gnsstk-apps
Other
339 stars 182 forks source link

Python bindings problems in ubuntu x64 #20

Closed cartoocm closed 5 years ago

cartoocm commented 7 years ago

Hi. When I tried import in python this error message appears:

`Python 2.7.12 (default, Jul 1 2016, 15:12:24) [GCC 5.4.0 20160609] on linux2 Type "help", "copyright", "credits" or "license" for more information.

import gpstk Traceback (most recent call last): File "", line 1, in File "gpstk.py", line 24751, in def now(timeSystem=TimeSystem('UTC')): File "gpstk.py", line 9127, in init self.this.append(this) File "gpstk.py", line 9038, in getattr = lambda self, name: _swig_getattr(self, TimeSystem, name) File "gpstk.py", line 74, in _swig_getattr return _swig_getattr_nondynamic(self, class_type, name, 0) File "gpstk.py", line 69, in _swig_getattr_nondynamic return object.getattr(self, name) AttributeError: type object 'object' has no attribute 'getattr' exit() ` Ubuntu x64 Python 2.7.12

And make with flags

./build.sh -i "%HOME/progs/gpstk" -cdeTp -P "/usr/bin/python2.7"

Thanks

ncouro commented 7 years ago

It's a bug in the version of SWIG shipped with Ubuntu 16.04, see my answer to #21 for the solution.