Jump to content
Sign in to follow this  
allexj

[GNURADIO]Error when I try to use Embedded Python Block and to return lists of bits from it

Recommended Posts

76071745-07930f00-5f97-11ea-909d-f995140
76071751-095cd280-5f97-11ea-9627-0e5149b
 
As you can see, this "Sequences_vectors" python embedded block that I created, has a list of bit sequences and it uses a for cycle to select each sequence and then return them to the next block (Repeat block) to go on in the flowgraph.
I did this to simulate a "Vector Source" block(that takes a _single_ list of bits), but that takes more than a single sequence of bits (in my case, as you can see in the code, there are three sequences).
 
I'd like to transmit each of these three sequences of bits. How can I do?
 
If I start the graph, it reports this errors:
 
 
Generating: '/Users/user/top_block.py'

Executing: /opt/local/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python -u /Users/user/top_block.py

handler caught exception: in method 'block_gw_message_type_work_args_return_value_set', argument 2 of type 'int'
Traceback (most recent call last):
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/gnuradio/gr/gateway.py", line 55, in eval
try: self._callback()
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/gnuradio/gr/gateway.py", line 225, in __gr_block_handle
) for i in range(noutputs)],
TypeError: in method 'block_gw_message_type_work_args_return_value_set', argument 2 of type 'int'
thread[thread-per-block[1]: <block Sequences_vectors (2)>]: SWIG director method error. Error detected when calling 'feval_ll.eval'
 
 
But even if it started without errors, I guess that the python embedded block wouldn't behave as expected. In fact I think it would return one list and stops, since the "return" only works one time and not more than one (so the other two sequences can't be "returned"). So I think my code wouldn't work.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...