Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Last added blocks (FIR filter, SigGen, Window) crash gnuradio-companion #61

Closed
Zlika opened this issue May 20, 2022 · 1 comment · Fixed by #63
Closed

Last added blocks (FIR filter, SigGen, Window) crash gnuradio-companion #61

Zlika opened this issue May 20, 2022 · 1 comment · Fixed by #63

Comments

@Zlika
Copy link
Contributor

Zlika commented May 20, 2022

Hello,
I have the following configuration (all compiled from sources) :

  • GnuRadio 3.8.5
  • UHD 4.2.0.0
  • gr-ettus from latest commit (533babf)

When I try to add a RFNoC block under gnuradio-companion, all blocks are working ok except the latest added blocks: FIR Filter, SigGen, Window. When I try to add one of these blocks in a flowgraph, I have the following error, and the block does not appear:

Traceback (most recent call last):
  File "/usr/local/lib/python3.9/dist-packages/gnuradio/grc/gui/Application.py", line 410, in _handle_action
    flow_graph_update()
  File "/usr/local/lib/python3.9/dist-packages/gnuradio/grc/gui/Application.py", line 122, in flow_graph_update
    fg.update()
  File "/usr/local/lib/python3.9/dist-packages/gnuradio/grc/gui/canvas/flowgraph.py", line 205, in update
    self.create_labels()
  File "/usr/local/lib/python3.9/dist-packages/gnuradio/grc/gui/canvas/flowgraph.py", line 508, in create_labels
    element.create_labels(cr)
  File "/usr/local/lib/python3.9/dist-packages/gnuradio/grc/gui/canvas/block.py", line 169, in create_labels
    markups = [param.format_block_surface_markup()
  File "/usr/local/lib/python3.9/dist-packages/gnuradio/grc/gui/canvas/block.py", line 169, in <listcomp>
    markups = [param.format_block_surface_markup()
  File "/usr/local/lib/python3.9/dist-packages/gnuradio/grc/gui/canvas/param.py", line 173, in format_block_surface_markup
    self.pretty_print().replace('\n', ' '))
  File "/usr/local/lib/python3.9/dist-packages/gnuradio/grc/gui/canvas/param.py", line 121, in pretty_print
    return self.truncate(value)
  File "/usr/local/lib/python3.9/dist-packages/gnuradio/grc/gui/canvas/param.py", line 99, in truncate
    if len(string) > max_len:
TypeError: object of type 'int' has no len()
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/dist-packages/gnuradio/grc/gui/DrawingArea.py", line 220, in draw
    self._flow_graph.draw(cr)
  File "/usr/local/lib/python3.9/dist-packages/gnuradio/grc/gui/canvas/flowgraph.py", line 535, in draw
    draw_element(cr)
  File "/usr/local/lib/python3.9/dist-packages/gnuradio/grc/gui/canvas/block.py", line 261, in draw
    port.draw(cr)
  File "/usr/local/lib/python3.9/dist-packages/gnuradio/grc/gui/canvas/port.py", line 143, in draw
    cr.rectangle(*self._area)
TypeError: Context.rectangle() takes exactly 4 arguments (0 given)
(...)

Is there a known workaround?
Thanks.

@Zlika
Copy link
Contributor Author

Zlika commented May 20, 2022

I think I've found a workaround. In ettus_rfnoc_fir_filter_block.yml, if I comment the line "options=[1, 2, ..." related to the num_chans parameter, the error disappears. It seems that "option" does not work with "int" type. Maybe another solution would be to use an "enum" type?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant