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

Fix python binding (3.10) #11

Open
jwmelto opened this issue Aug 8, 2022 · 5 comments
Open

Fix python binding (3.10) #11

jwmelto opened this issue Aug 8, 2022 · 5 comments

Comments

@jwmelto
Copy link
Contributor

jwmelto commented Aug 8, 2022

From maint-3.10 branch, run make install.

bash-4.2$ python -c 'import CyberRadio'
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/opt/foss/lib64/python3.8/site-packages/CyberRadio/__init__.py", line 24, in <module>
    from .generic_radio_control_block import generic_radio_control_block
  File "/opt/foss/lib64/python3.8/site-packages/CyberRadio/generic_radio_control_block.py", line 28, in <module>
    import CyberRadioDriver as crd
ModuleNotFoundError: No module named 'CyberRadioDriver'

If the driver isn't (currently) supported in the 3.10 branch, then it should not be imported in the wrapper code.

@crs-bs
Copy link
Collaborator

crs-bs commented Aug 9, 2022

I need to upload the Python3 version of the CyberRadioDriver. It will be here in a couple hours

@jwmelto
Copy link
Contributor Author

jwmelto commented Sep 14, 2022

I see you've made an update, but there are no (usable) build instructions. makedeb and makerpm are your internal tools?

@blsmit5728
Copy link
Collaborator

I'll fix the master branch README, but maint-3.10 has all the right stuff: Here

@jwmelto
Copy link
Contributor Author

jwmelto commented Sep 22, 2022

Generating a flowgraph spews these errors:

Error while loading /opt/foss/share/gnuradio/grc/blocks/CyberRadio_generic_radio_control_block.block.yml
Traceback (most recent call last):
  File "/opt/foss/lib64/python3.8/site-packages/gnuradio/grc/core/platform.py", line 149, in build_library
    data = cache.get_or_load(file_path)
  File "/opt/foss/lib64/python3.8/site-packages/gnuradio/grc/core/cache.py", line 67, in get_or_load
    data = yaml.safe_load(fp)
  File "/opt/rh/rh-python38/root/usr/lib64/python3.8/site-packages/yaml/__init__.py", line 125, in safe_load
    return load(stream, SafeLoader)
  File "/opt/rh/rh-python38/root/usr/lib64/python3.8/site-packages/yaml/__init__.py", line 81, in load
    return loader.get_single_data()
  File "/opt/rh/rh-python38/root/usr/lib64/python3.8/site-packages/yaml/constructor.py", line 49, in get_single_data
    node = self.get_single_node()
  File "/opt/rh/rh-python38/root/usr/lib64/python3.8/site-packages/yaml/composer.py", line 36, in get_single_node
    document = self.compose_document()
  File "/opt/rh/rh-python38/root/usr/lib64/python3.8/site-packages/yaml/composer.py", line 55, in compose_document
    node = self.compose_node(None, None)
  File "/opt/rh/rh-python38/root/usr/lib64/python3.8/site-packages/yaml/composer.py", line 84, in compose_node
    node = self.compose_mapping_node(anchor)
  File "/opt/rh/rh-python38/root/usr/lib64/python3.8/site-packages/yaml/composer.py", line 127, in compose_mapping_node
    while not self.check_event(MappingEndEvent):
  File "/opt/rh/rh-python38/root/usr/lib64/python3.8/site-packages/yaml/parser.py", line 98, in check_event
    self.current_event = self.state()
  File "/opt/rh/rh-python38/root/usr/lib64/python3.8/site-packages/yaml/parser.py", line 438, in parse_block_mapping_key
    raise ParserError("while parsing a block mapping", self.marks[-1],
yaml.parser.ParserError: while parsing a block mapping
  in "/opt/foss/share/gnuradio/grc/blocks/CyberRadio_generic_radio_control_block.block.yml", line 1, column 1
expected <block end>, but found '<scalar>'
  in "/opt/foss/share/gnuradio/grc/blocks/CyberRadio_generic_radio_control_block.block.yml", line 2, column 21
while parsing a block mapping
  in "/opt/foss/share/gnuradio/grc/blocks/CyberRadio_generic_radio_control_block.block.yml", line 1, column 1
expected <block end>, but found '<scalar>'
  in "/opt/foss/share/gnuradio/grc/blocks/CyberRadio_generic_radio_control_block.block.yml", line 2, column 21
Traceback (most recent call last):
  File "/opt/foss/lib64/python3.8/site-packages/gnuradio/grc/core/platform.py", line 149, in build_library
    data = cache.get_or_load(file_path)
  File "/opt/foss/lib64/python3.8/site-packages/gnuradio/grc/core/cache.py", line 67, in get_or_load
    data = yaml.safe_load(fp)
  File "/opt/rh/rh-python38/root/usr/lib64/python3.8/site-packages/yaml/__init__.py", line 125, in safe_load
    return load(stream, SafeLoader)
  File "/opt/rh/rh-python38/root/usr/lib64/python3.8/site-packages/yaml/__init__.py", line 81, in load
    return loader.get_single_data()
  File "/opt/rh/rh-python38/root/usr/lib64/python3.8/site-packages/yaml/constructor.py", line 49, in get_single_data
    node = self.get_single_node()
  File "/opt/rh/rh-python38/root/usr/lib64/python3.8/site-packages/yaml/composer.py", line 36, in get_single_node
    document = self.compose_document()
  File "/opt/rh/rh-python38/root/usr/lib64/python3.8/site-packages/yaml/composer.py", line 55, in compose_document
    node = self.compose_node(None, None)
  File "/opt/rh/rh-python38/root/usr/lib64/python3.8/site-packages/yaml/composer.py", line 84, in compose_node
    node = self.compose_mapping_node(anchor)
  File "/opt/rh/rh-python38/root/usr/lib64/python3.8/site-packages/yaml/composer.py", line 127, in compose_mapping_node
    while not self.check_event(MappingEndEvent):
  File "/opt/rh/rh-python38/root/usr/lib64/python3.8/site-packages/yaml/parser.py", line 98, in check_event
    self.current_event = self.state()
  File "/opt/rh/rh-python38/root/usr/lib64/python3.8/site-packages/yaml/parser.py", line 438, in parse_block_mapping_key
    raise ParserError("while parsing a block mapping", self.marks[-1],
yaml.parser.ParserError: while parsing a block mapping
  in "/opt/foss/share/gnuradio/grc/blocks/CyberRadio_generic_radio_control_block.block.yml", line 1, column 1
expected <block end>, but found '<scalar>'
  in "/opt/foss/share/gnuradio/grc/blocks/CyberRadio_generic_radio_control_block.block.yml", line 2, column 21

I can't make sense of it, but maybe you can. Possibly the control block is included from another block?
(I have no controll block; just a vita_udp_rx block)

It doesn't seem to have any negative effect, but I'd prefer not to have "normal" errors.

@blsmit5728
Copy link
Collaborator

I think this stems from not having quotes around the label. I'll fix in next update with #12

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

No branches or pull requests

3 participants