TypeError in Python... why?

Hi List,
I’m writing a new module starting from the source code of
unpacked_to_packed_ss. Instead of taking the LSB from of the source, I
need to take the MSB. So, I change few lines, use the environment
provided by “how to write a new module”, put in my source code, change
Makefile.am and write a new python test script (which is attached with
this mail).
My code compile clean, but the python test fails with a strange a (for
me) incomprehensible error:

======================================================================
ERROR: test_001 (main.qa_u_msb2p)

Traceback (most recent call last):
File “./qa_u_msb2_p.py”, line 46, in test_001
u2p = dspcola.unpacked_msb_to_packed_ss (1, gr.GR_MSB_FIRST)
File “/home/rocker/Tesi/My/SVN/dspcola/src/lib/dspcola.py”, line 137,
in unpacked_msb_to_packed_ss
return _dspcola.unpacked_msb_to_packed_ss(*args)
TypeError: in method ‘unpacked_msb_to_packed_ss’, argument 2 of type
‘gr_endianness_t’

Attached there is my python test and the Makefile.am I put in src/lib/
of the source tree.
Regards,

Davide A.

web: http://www.davideanastasia.com/
email: [email protected]

Il giorno mer, 30/05/2007 alle 11.12 +0200, Davide A. ha scritto:

======================================================================
‘gr_endianness_t’

Attached there is my python test and the Makefile.am I put in src/lib/
of the source tree.

Ok, self-answer!! :slight_smile:
I hope to be useful to some other.

I simply forgotten to add the line below to my .i file:

%import “gr_endianness.i”

Now it seems work. I’m testing!
Regards,

Davide A.

web: http://www.davideanastasia.com/
email: [email protected]

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs