You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using File Meta Source with a parameter, runtime-adjusting the file name does not work with the automatically generated Python code, at least if detatched header = False. I'm pretty sure it also won't work with detached_header = True, but I didn't test it.
The automatically generated Python code is invalid and will cause an exception/error when used.
For the file source block, the auto-generated code works as expected.
System Information
OS: Ubuntu 20.04 LTS (x86-64)
GR Installation Method: radioconda
GNU Radio Version
3.10 (maint-3.10)
Specific Version
3.10.9.2
Steps to Reproduce the Problem
Create a GRC flowgraph with a File Meta Source (connected to a Null sink) and a Parameter block with the parameter name "file". Use this parameter as file name. Other parameter names are acceptable of course, but will change the name of the set-method created
instantiate Top Block from Python and call set_file(<...>) after instantiation.
>>>fromcrashimportcrash>>>tb=crash(filename="test.bin")
>>>tb.set_filename("/dev/zero") # <--- the file name you speficy here does not matter, the error will always occur.
Relevant log output
Traceback (most recent call last):
File "<stdin>", line 1, in<module>
File "/home/<username>/tests/crash_python/crash.py", line 59, in set_file
self.blocks_file_meta_source_0.open(self.file, True)
TypeError: open(): incompatible functionarguments. The following argument types are supported:
1. (self: gnuradio.blocks.blocks_python.file_meta_source, filename: str, hdr_filename: str = '') -> bool
Invoked with: <gnuradio.blocks.blocks_python.file_meta_source object at 0x7f73f30be970>, '/dev/zero', True
The text was updated successfully, but these errors were encountered:
What happened?
When using File Meta Source with a parameter, runtime-adjusting the file name does not work with the automatically generated Python code, at least if detatched header = False. I'm pretty sure it also won't work with detached_header = True, but I didn't test it.
The automatically generated Python code is invalid and will cause an exception/error when used.
For the file source block, the auto-generated code works as expected.
System Information
OS: Ubuntu 20.04 LTS (x86-64)
GR Installation Method: radioconda
GNU Radio Version
3.10 (maint-3.10)
Specific Version
3.10.9.2
Steps to Reproduce the Problem
Relevant log output
The text was updated successfully, but these errors were encountered: