Hi, everyone,
When I ran a python program, I met such a question, can you holp me to
point out where the problem is?
The problem is as follows:
Traceback (most recent call last):
 File “MainFrame.py”, line 106, in OnDBPSK_Demodulate
   objDemod = DBPSKDemod.dbpsk_demod(fg)
 File “/home/cwang/prj/ufl/source_code/Receiver/DBPSKDemod.py”, line
153, in init
   gr.hier_block2.init(self, self._fg, self.pre_scaler,
self.unpack)Â Â Â #changed from block to block2, cwang 9.29
 File
“/usr/local/lib/python2.6/dist-packages/gnuradio/gr/hier_block2.py”,
line 42, in init
   self._hb = hier_block2_swig(name, input_signature, output_signature)
 File
“/usr/local/lib/python2.6/dist-packages/gnuradio/gr/gnuradio_swig_py_runtime.py”,
line 1015, in hier_block2_swig
   return _gnuradio_swig_py_runtime.hier_block2_swig(*args, **kwargs)
TypeError: in method ‘hier_block2_swig’, argument 1 of type ‘std::string
const’
Thanks.
Cheng
On Thu, Sep 30, 2010 at 4:34 PM, 王铖 [email protected] wrote:
File “/home/cwang/prj/ufl/source_code/Receiver/DBPSKDemod.py”, line 153,
TypeError: in method ‘hier_block2_swig’, argument 1 of type ‘std::string
const’
Thanks.
Cheng
From: self._hb = hier_block2_swig(name, input_signature,
output_signature),
you’re supposed to pass an argument “name” to the hier_block2
constructor,
so the error is telling you that you’re using the wrong type (i.e., not
a
string like it’s expecting).
From: gr.hier_block2.init(self, self._fg, self.pre_scaler,
self.unpack),
you’re passing a flow graph as the argument instead of a name.
The comment suggests you just changed “block” to “block2”, but there
were
more changes than just the cosmetic name change, so you’ll need to look
into
how to use the hier_block2.
Tom
Hi Cheng
i am having the same problem
Did you find any solution??
Please let me know
thanks very much
Shashank gaur
王铖 wrote:
objDemod = DBPSKDemod.dbpsk_demod(fg)
line 1015, in hier_block2_swig
Discuss-gnuradio mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/discuss-gnuradio
–
View this message in context:
http://old.nabble.com/About-a-typeerror-tp29852246p30067653.html
Sent from the GnuRadio mailing list archive at Nabble.com.