|
From: Diptanshu J. <dip...@gm...> - 2017-05-23 08:32:43
|
Hello, It seems that I have a line called #define VERSION "0.85" in my codebase and the corresponding header file is also included in the SWIG interface file. But still I am getting *Traceback (most recent call last): File "<stdin>", line 1, in <module> File "ccextractorapi.py", line 98, in <module> VERSION = _ccextractorapi.VERSIONAttributeError: 'module' object has no attribute 'VERSION'* Please let me know where am I going wrong. On Mon, May 22, 2017 at 12:40 PM Diptanshu Jamgade <dip...@gm...> wrote: > > Hello, > My name is Diptanshu. I am presently working with CCExtractor on a project > of developing python extension module and I am enrolled in GSOC 2017. > For generating the python modules, I tried to take up SWIG but I am > presently having trouble. You can find my interface file at > https://github.com/Diptanshu8/ccextractor/blob/gsoc_work_bento_16_library/linux/ccextractorapi.i > . The corresponding C code is available at > https://github.com/Diptanshu8/ccextractor/blob/gsoc_work_bento_16_library/src/ccextractorapi.c > and the respective header file at > https://github.com/Diptanshu8/ccextractor/blob/gsoc_work_bento_16_library/src/ccextractorapi.h > . Now the generated wrapper code has been generated using the command `swig > -python ccextractorapi.i` and the wrapper could be found at > https://github.com/Diptanshu8/ccextractor/blob/gsoc_work_bento_16_library/linux/ccextractorapi_wrap.c > . Now when I am generating a .so file with this and trying to import the > module in python 2.7, I am getting the following error: > > > > > > *Traceback (most recent call last): File "<stdin>", line 1, in <module> > File "ccextractorapi.py", line 98, in <module> VERSION = > _ccextractorapi.VERSIONAttributeError: 'module' object has no attribute > 'VERSION'* > Tracing back to the ccextractorapi.py file, I am unable to understand how > I am getting this attribute error as this attribute doesn't exist in entire > codebase. Kindly let me know about how to get rid of this error. > I am presently working on Ubuntu 16.04 LTS vagrant box. > Thank you. > -- > *Diptanshu Jamgade * > Fourth Year Undergraduate Student > Department of Electronics and Electrical Communication Engineering > IIT Kharagpur > (+91) 77-97-436-712 > <https://mail.google.com/mail/u/0/goog_1543320810> > Email <dip...@gm...> > LinkedIn <https://in.linkedin.com/in/diptanshu-jamgade> > > -- *Diptanshu Jamgade * Fourth Year Undergraduate Student Department of Electronics and Electrical Communication Engineering IIT Kharagpur (+91) 77-97-436-712 <https://mail.google.com/mail/u/0/goog_1543320810> Email <dip...@gm...> LinkedIn <https://in.linkedin.com/in/diptanshu-jamgade> |