# Error when compiling DSDLs

**URL:** <https://forum.opencyphal.org/t/error-when-compiling-dsdls/242>\
**Category:** PyCyphal\
**Created:** [November 12, 2018, 8:48am UTC](https://forum.opencyphal.org/t/error-when-compiling-dsdls/242 "2018-11-12T08:48:38Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![deekay](https://forum.opencyphal.org/letter_avatar_proxy/v4/letter/d/8491ac/32.png) [@deekay](https://forum.opencyphal.org/u/deekay)\
**Post date:** [November 12, 2018, 8:48am UTC](https://forum.opencyphal.org/t/error-when-compiling-dsdls/242/1 "2018-11-12T08:48:38Z")

</div>

Suddenly, without adding any strange characters in my DSDLs, I get the following compile error

```nohighlight
Compiler failure
Traceback (most recent call last):
  File "/usr/local/bin/libuavcan_dsdlc", line 61, in <module>
    dsdlc_run(args.source_dir, args.incdir, args.outdir)
  File "/usr/local/lib/python2.7/dist-packages/libuavcan_dsdl_compiler/ __init__.py", line 63, in run
    run_generator(types, output_dir)
  File "/usr/local/lib/python2.7/dist-packages/libuavcan_dsdl_compiler/ __init__.py", line 112, in run_generator
    die(ex)
  File "/usr/local/lib/python2.7/dist-packages/libuavcan_dsdl_compiler/ __init__.py", line 90, in die
    raise DsdlCompilerException(str(text))
DsdlCompilerException: 'ascii' codec can't decode byte 0xe2 in position 10: ordinal not in range(128)
'ascii' codec can't decode byte 0xe2 in position 10: ordinal not in range(128)

```

Character 0xe2 is nothing I have added… Why is this emerging?

Kind Regards

---

<div class="post-metadata">

**Author:** ![pavel.kirienko](https://forum.opencyphal.org/user_avatar/forum.opencyphal.org/pavel.kirienko/32/9_2.png) [@pavel.kirienko](https://forum.opencyphal.org/u/pavel.kirienko)\
**Post date:** [November 12, 2018, 9:29am UTC](https://forum.opencyphal.org/t/error-when-compiling-dsdls/242/2 "2018-11-12T09:29:21Z")

</div>

Post the offending source file here, please. Attach the whole file, don’t copy-paste it’s contents, since the latter may fail to reproduce possible encoding problems.

---

<div class="post-metadata">

**Author:** ![deekay](https://forum.opencyphal.org/letter_avatar_proxy/v4/letter/d/8491ac/32.png) [@deekay](https://forum.opencyphal.org/u/deekay)\
**Post date:** [November 12, 2018, 9:33am UTC](https://forum.opencyphal.org/t/error-when-compiling-dsdls/242/3 "2018-11-12T09:33:16Z")

</div>

Hi! I am not sure what DSDL source file it is… Or are you refering to the **init**.py?  
I can see in the generated header file directory that it stop generating .hpp files when the error occurs. But I am not sure about in what order the files are created and what file that is upcoming.  
How is the compiler sorting the files?

Btw. Where is logger.info( ) writing log messages to?

BR

---

<div class="post-metadata">

**Author:** ![deekay](https://forum.opencyphal.org/letter_avatar_proxy/v4/letter/d/8491ac/32.png) [@deekay](https://forum.opencyphal.org/u/deekay)\
**Post date:** [November 12, 2018, 10:56am UTC](https://forum.opencyphal.org/t/error-when-compiling-dsdls/242/4 "2018-11-12T10:56:41Z")

</div>

I found the problem. A minus ‘-’ was changed into '–" by my editor.  
Thanks for your time.

BR  
Daniel

---

<div class="post-metadata">

**Author:** ![pavel.kirienko](https://forum.opencyphal.org/user_avatar/forum.opencyphal.org/pavel.kirienko/32/9_2.png) [@pavel.kirienko](https://forum.opencyphal.org/u/pavel.kirienko)\
**Post date:** [November 12, 2018, 12:26pm UTC](https://forum.opencyphal.org/t/error-when-compiling-dsdls/242/5 "2018-11-12T12:26:03Z")

</div>

> [@deekay](#):
>
> I am not sure what DSDL source file it is…

Things like this are DSDL source files: [https://github.com/UAVCAN/dsdl/blob/master/uavcan/protocol/341.NodeStatus.uavcan](https://github.com/UAVCAN/dsdl/blob/master/uavcan/protocol/341.NodeStatus.uavcan)

> [@deekay](#):
>
> Btw. Where is logger.info( ) writing log messages to?

Nowhere, they just disappear unless the compiler is invoked with `-v`. Use `--help` for usage info.

> [@deekay](#):
>
> But I am not sure about in what order the files are created and what file that is upcoming.

This is a problem of the old parser that is now fixed in the new parser (which is under development still): the compiler was supposed to report which exact file caused the problem, but it didn’t.

---

<div class="post-metadata">

**Author:** ![deekay](https://forum.opencyphal.org/letter_avatar_proxy/v4/letter/d/8491ac/32.png) [@deekay](https://forum.opencyphal.org/u/deekay)\
**Post date:** [November 13, 2018, 7:16pm UTC](https://forum.opencyphal.org/t/error-when-compiling-dsdls/242/6 "2018-11-13T19:16:20Z")

</div>

Ok I see. Thanks for the info!

Kind Regards  
Daniel
