discuss-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Discuss-gnuradio] mc4020 + microtune -- ValueError: source and dest


From: Ilia Mirkin
Subject: Re: [Discuss-gnuradio] mc4020 + microtune -- ValueError: source and destination data sizes are different
Date: Wed, 26 Jan 2005 19:42:42 -0500

Jamie and I are working on this together, but for the benefit of the
list, here is what the problem was:

(after familiarizing myself with the gnuradio internals and looking at a
bunch of other examples)

fftsink takes a complex. the mc4020 puts out a short. there is a
short_to_float conversion going on (that's the "cvt" in the code), and
float != complex, hence the ValueError.

My solution to this was to add a float_to_complex block in there, and
that seemed to make python happy. It didn't seem to read data in, but
this could be due to about 1000 different things that I will be
investigating later on.

I feel that fftsink should have a way of taking a float, since,
afterall, how hard is it to take an fft of a real signal when you can do
it with a complex signal, but this may be complicated due to gnuradio
architecture... if you have a better way of fixing this, please do let
me know.

BTW, my port of the mc4020 driver to 2.6 causes massive memory
corruption - seems to make python croak a lot of the time, as well as
gcc. If anyone has something that works better than that, please let me
know or post a link.

---
Ilia Mirkin
address@hidden

On Tue, 2005-01-18 at 16:50 -0500, James Cooley wrote:
> Hello, can anyone provide any advice on this error? We just built from 
> the CVS and are using a Measurement Computing card with a microtune 
> 4937. Other examples, particularly audio (dialtone, audio_play) work well.
> 
> Thanks,
> 
> -Jamie
> 
> ============================================================================
> 
> 
> bash-2.05b$ ./mc4020_fft.py 400
> Traceback (most recent call last):
>   File "./mc4020_fft.py", line 53, in ?
>     main ()
>   File "./mc4020_fft.py", line 49, in main
>     app = stdgui.stdapp (app_flow_graph, "USRP FFT")
>   File 
> "/usr/local/gnuser/gnuradio/lib/python2.3/site-packages/gnuradio/wxgui/stdgui.py",
>  
> line 35, in __init__
>     wx.App.__init__ (self)
>   File 
> "/usr/lib/python2.3/site-packages/wx-2.5.3-gtk2-unicode/wx/_core.py", 
> line 5301, in __init__
>     self._BootstrapApp()
>   File 
> "/usr/lib/python2.3/site-packages/wx-2.5.3-gtk2-unicode/wx/_core.py", 
> line 4980, in _BootstrapApp
>     return _core_.PyApp__BootstrapApp(*args, **kwargs)
>   File 
> "/usr/local/gnuser/gnuradio/lib/python2.3/site-packages/gnuradio/wxgui/stdgui.py",
>  
> line 38, in OnInit
>     frame = stdframe (self.flow_graph_maker, self.title)
>   File 
> "/usr/local/gnuser/gnuradio/lib/python2.3/site-packages/gnuradio/wxgui/stdgui.py",
>  
> line 60, in __init__
>     self.panel = stdpanel (self, self, flow_graph_maker)
>   File 
> "/usr/local/gnuser/gnuradio/lib/python2.3/site-packages/gnuradio/wxgui/stdgui.py",
>  
> line 80, in __init__
>     self.fg = flow_graph_maker (frame, self, vbox, sys.argv)
>   File "./mc4020_fft.py", line 44, in __init__
>     self.connect (cvt, block)
>   File 
> "/usr/local/gnuser/gnuradio/lib/python2.3/site-packages/gnuradio/gr/basic_flow_graph.py",
>  
> line 85, in connect
>     self._check_type_match (src_endpoint, dst_endpoint)
>   File 
> "/usr/local/gnuser/gnuradio/lib/python2.3/site-packages/gnuradio/gr/basic_flow_graph.py",
>  
> line 192, in _check_type_match
>     raise ValueError, 'source and destination data sizes are different'
> ValueError: source and destination data sizes are different
> Unhandled exception in thread started by <bound method 
> input_watcher.__bootstrap of <input_watcher(Thread-1, stopped daemon)>>
> Traceback (most recent call last):
>   File "/usr/lib/python2.3/threading.py", line 451, in __bootstrap
>     self.__stop()
>   File "/usr/lib/python2.3/threading.py", line 460, in __stop
>     self.__block.notifyAll()
>   File "/usr/lib/python2.3/threading.py", line 256, in notifyAll
>     self.notify(len(self.__waiters))
>   File "/usr/lib/python2.3/threading.py", line 238, in notify
>     currentThread() # for side-effect
> TypeError: 'NoneType' object is not callable
> bash-2.05b$
> 
> 
> 
> _______________________________________________
> Discuss-gnuradio mailing list
> address@hidden
> http://lists.gnu.org/mailman/listinfo/discuss-gnuradio





reply via email to

[Prev in Thread] Current Thread [Next in Thread]