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

doesn’t work #32

Open
karu2003 opened this issue Sep 3, 2024 · 1 comment
Open

doesn’t work #32

karu2003 opened this issue Sep 3, 2024 · 1 comment

Comments

@karu2003
Copy link

karu2003 commented Sep 3, 2024

if you take an example from your repository https://github.com/dronecan/DSDL, it doesn’t work.

python dronecan_dsdlc/dronecan_dsdlc.py -O DSDL_C DSDL/ardupilot/

Internal error
Traceback (most recent call last):
File "/home/andrew/.local/lib/python3.10/site-packages/dronecan/dsdl/parser.py", line 724, in parse
return self.parse_source(filename, source_text)
File "/home/andrew/.local/lib/python3.10/site-packages/dronecan/dsdl/parser.py", line 716, in parse_source
raise ex
File "/home/andrew/.local/lib/python3.10/site-packages/dronecan/dsdl/parser.py", line 680, in parse_source
raise ex
File "/home/andrew/.local/lib/python3.10/site-packages/dronecan/dsdl/parser.py", line 667, in parse_source
attr = self._parse_line(filename, tokens)
File "/home/andrew/.local/lib/python3.10/site-packages/dronecan/dsdl/parser.py", line 620, in _parse_line
attrtype = self._parse_type(filename, typename, cast_mode)
File "/home/andrew/.local/lib/python3.10/site-packages/dronecan/dsdl/parser.py", line 582, in _parse_type
return self._parse_compound_type(filename, typedef)
File "/home/andrew/.local/lib/python3.10/site-packages/dronecan/dsdl/parser.py", line 552, in _parse_compound_type
definition_filename = self._locate_compound_type_definition(filename, typedef)
File "/home/andrew/.local/lib/python3.10/site-packages/dronecan/dsdl/parser.py", line 479, in _locate_compound_type_definition
directories = locate_namespace_directories(namespace)
File "/home/andrew/.local/lib/python3.10/site-packages/dronecan/dsdl/parser.py", line 470, in locate_namespace_directories
error('Unknown namespace [%s]', ns)
File "/home/andrew/.local/lib/python3.10/site-packages/dronecan/dsdl/parser.py", line 733, in error
raise DsdlException(fmt % args)
dronecan.dsdl.common.DsdlException: DSDL/ardupilot/gnss/20006.RelPosHeading.uavcan:2: Unknown namespace [uavcan]
Traceback (most recent call last):
File "/home/andrew/.local/lib/python3.10/site-packages/dronecan/dsdl/parser.py", line 724, in parse
return self.parse_source(filename, source_text)
File "/home/andrew/.local/lib/python3.10/site-packages/dronecan/dsdl/parser.py", line 716, in parse_source
raise ex
File "/home/andrew/.local/lib/python3.10/site-packages/dronecan/dsdl/parser.py", line 680, in parse_source
raise ex
File "/home/andrew/.local/lib/python3.10/site-packages/dronecan/dsdl/parser.py", line 667, in parse_source
attr = self._parse_line(filename, tokens)
File "/home/andrew/.local/lib/python3.10/site-packages/dronecan/dsdl/parser.py", line 620, in _parse_line
attrtype = self._parse_type(filename, typename, cast_mode)
File "/home/andrew/.local/lib/python3.10/site-packages/dronecan/dsdl/parser.py", line 582, in _parse_type
return self._parse_compound_type(filename, typedef)
File "/home/andrew/.local/lib/python3.10/site-packages/dronecan/dsdl/parser.py", line 552, in _parse_compound_type
definition_filename = self._locate_compound_type_definition(filename, typedef)
File "/home/andrew/.local/lib/python3.10/site-packages/dronecan/dsdl/parser.py", line 479, in _locate_compound_type_definition
directories = locate_namespace_directories(namespace)
File "/home/andrew/.local/lib/python3.10/site-packages/dronecan/dsdl/parser.py", line 470, in locate_namespace_directories
error('Unknown namespace [%s]', ns)
File "/home/andrew/.local/lib/python3.10/site-packages/dronecan/dsdl/parser.py", line 733, in error
raise DsdlException(fmt % args)
dronecan.dsdl.common.DsdlException: DSDL/ardupilot/gnss/20006.RelPosHeading.uavcan:2: Unknown namespace [uavcan]

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/home/andrew/dronecan/dronecan_dsdlc/dronecan_dsdlc.py", line 81, in
messages = dronecan.dsdl.parse_namespaces(namespace_paths)
File "/home/andrew/.local/lib/python3.10/site-packages/dronecan/dsdl/parser.py", line 885, in parse_namespaces
t = parser.parse(filename)
File "/home/andrew/.local/lib/python3.10/site-packages/dronecan/dsdl/parser.py", line 729, in parse
raise DsdlException('Internal error: %s' % str(ex), file=filename)
dronecan.dsdl.common.DsdlException: DSDL/ardupilot/gnss/20006.RelPosHeading.uavcan: Internal error: DSDL/ardupilot/gnss/20006.RelPosHeading.uavcan:2: Unknown namespace [uavcan]

@tpwrules
Copy link
Contributor

You have to use the command python dronecan_dsdlc/dronecan_dsdlc.py -O DSDL_C DSDL/

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

2 participants