# Problem with "Extras:Packet Framer"

**URL:** <https://www.ruby-forum.com/t/problem-with-extras-packet-framer/225528>\
**Category:** GNU Radio\
**Created:** [January 13, 2013, 2:19pm UTC](https://www.ruby-forum.com/t/problem-with-extras-packet-framer/225528 "2013-01-13T14:19:17Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![aris](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/258eb7/32.png) [@aris](https://www.ruby-forum.com/u/aris)\
**Post date:** [January 13, 2013, 2:19pm UTC](https://www.ruby-forum.com/t/problem-with-extras-packet-framer/225528/1 "2013-01-13T14:19:17Z")

</div>

Hi, I am using GNU Radio 3.6.3rc0 with Ubuntu 12.10  
since I am new in GNURadio and python, I am currently using the  
gnuradio-companion to build simple examples.  
I have installed the Extras package and trying to use the Packet Framer.  
Extras: Socket to Blob --\> Extras: Packet Framer --\> GMSK mod  
al though my project is excuting, as soon as I try to stream to the  
socket  
using the nc command I get the following error:

handler caught exception: ‘module’ object has no attribute  
‘pmt\_blob\_length’  
Traceback (most recent call last):  
File  
“/usr/local/lib/python2.7/dist-packages/gnuradio/extras/block\_gateway.py”,  
line 53, in eval  
try: self.\_callback()  
File  
“/usr/local/lib/python2.7/dist-packages/gnuradio/extras/block\_gateway.py”,  
line 124, in \_\_gr\_block\_handle  
) for i in self.\_\_out\_indexes],  
File  
“/usr/local/lib/python2.7/dist-packages/gnuradio/extras/packet\_framer.py”,  
line 82, in work  
pmt.pmt\_blob\_data(msg.value).tostring(),  
File  
“/usr/local/lib/python2.7/dist-packages/gnuradio/extras/extras\_pmt.py”,  
line 48, in pmt\_blob\_data  
return \_\_pointer\_to\_ndarray(extras\_swig.pmt\_blob\_rw\_data(blob),  
extras\_swig.pmt\_blob\_length(blob))  
AttributeError: ‘module’ object has no attribute ‘pmt\_blob\_length’  
thread[thread-per-block[0]: \<gr\_block mod\_pkts2 (8)\>]: caught  
unrecognized  
exception

replacing the Extras: Packet Framer with Extras: Blob to stream seems to  
work so I know the problem is related to the Packet Framer block

how can I resolve this issue?

Thanks, Guy

---

<div class="post-metadata">

**Author:** ![Guy\_H](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/b3f665/32.png) [@Guy\_H](https://www.ruby-forum.com/u/Guy_H)\
**Post date:** [January 13, 2013, 7:36pm UTC](https://www.ruby-forum.com/t/problem-with-extras-packet-framer/225528/2 "2013-01-13T19:36:27Z")

</div>

On 01/13/2013 07:18 AM, Guy H. wrote:

> File  
> pmt.pmt\_blob\_data(msg.value).tostring(),  
> work so I know the problem is related to the Packet Framer block
> 
> how can I resolve this issue?

Not sure why its doing that, pmt\_blob\_length should also be in that  
module. Can you try this diff and see if it resolves the issue:

> <https://pastebin.com/jzFuqvQH>

-josh

---

<div class="post-metadata">

**Author:** ![Guy\_H](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/b3f665/32.png) [@Guy\_H](https://www.ruby-forum.com/u/Guy_H)\
**Post date:** [January 14, 2013, 10:47am UTC](https://www.ruby-forum.com/t/problem-with-extras-packet-framer/225528/3 "2013-01-14T10:47:47Z")

</div>

I have 2 files named extras\_pmt.py:  
[1] /home/guy/grextras/python/extras\_pmt.py  
[2] usr/local/lib/python2.7/dist-packages/gnuradio/extras/extras\_pmt.py

the second one is read only, should I change them both?  
I have noticed that at least one of the files has a pyc associated with  
it  
(the second one)  
should I compile it after changing it?

Thanks for your quick response 🙂

Guy

---

<div class="post-metadata">

**Author:** ![Guy\_H](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/b3f665/32.png) [@Guy\_H](https://www.ruby-forum.com/u/Guy_H)\
**Post date:** [January 14, 2013, 8:34pm UTC](https://www.ruby-forum.com/t/problem-with-extras-packet-framer/225528/4 "2013-01-14T20:34:19Z")

</div>

yes, it seems to have solved the problem  
thanks! Guy

---

<div class="post-metadata">

**Author:** ![Guy\_H](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/b3f665/32.png) [@Guy\_H](https://www.ruby-forum.com/u/Guy_H)\
**Post date:** [January 14, 2013, 7:04pm UTC](https://www.ruby-forum.com/t/problem-with-extras-packet-framer/225528/5 "2013-01-14T19:04:23Z")

</div>

On 01/14/2013 03:46 AM, Guy H. wrote:

> I have 2 files named extras\_pmt.py:  
> [1] /home/guy/grextras/python/extras\_pmt.py  
> [2] usr/local/lib/python2.7/dist-packages/gnuradio/extras/extras\_pmt.py
> 
> the second one is read only, should I change them both?  
> I have noticed that at least one of the files has a pyc associated with it  
> (the second one)  
> should I compile it after changing it?

Yea, change the file in the source tree, then reinstall.

I’m hoping that whatever it was, this little change fixes it. Just  
confirm for me if it does (or more errors). Ill check the patch in.

-josh
