OpenCyphal / pycyphal

Python implementation of the Cyphal protocol stack.
https://pycyphal.readthedocs.io/
MIT License
119 stars 106 forks source link

Unhandled exception: DelimitedType.j2 #127

Closed jkearins closed 3 years ago

jkearins commented 3 years ago

Could you please help me with two questions? It's my first try to generate .h file from dsdl definition file. I've created dsdl file from the example: ./ns/my_project/MyMessageType.1.0.uavcan

# This is a header comment.
# It explains what this data type definition is for and why do we need it.

void48  # This space is reserved for future use.

uint8 VALUE_A = 1       # A comment describing the constant.
uint8 VALUE_B = 2       # Another one. Constants go before the field they relate to.
uint8 value
# This is an enumeration.
# We don't need blank lines because the items are tightly related.

float32[<100] aligned_array
# This is a new field, mind the blank line above.

1) when I run: >pyuavcan dsdl-gen-pkg ./ns I've got FileNotFoundError and subdirectory ./ns is disapeared. Why the script removes subdirectory sent as INPUT_PATH_OR_URI parameter? 2) when I run: >pyuavcan dsdl-gen-pkg ./ns/my_project I've got an error: Error: TemplateNotFound: DelimitedType.j2 What's wrong in MyMessageType.1.0.uavcan file? The file is successfully compiled with nnvg utility.

jkearins commented 3 years ago

The problem is resolved. 'pip install pyuavcan' installs the old version of nunavut (0.2.3), there is no template DelimitedType.j2 I've uninstalled pyuavcan and installed nunavut with 'pip install nunavut'. Now it has verision 0.4.0 and there's template DelimitedType.j2