# Yakut compile and monitor errors

**URL:** <https://forum.opencyphal.org/t/yakut-compile-and-monitor-errors/2069>\
**Category:** CLI tools (Cynic/Yakut)\
**Created:** [January 16, 2024, 12:28am UTC](https://forum.opencyphal.org/t/yakut-compile-and-monitor-errors/2069 "2024-01-16T00:28:53Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![jwwaite](https://forum.opencyphal.org/letter_avatar_proxy/v4/letter/j/7ab992/32.png) [@jwwaite](https://forum.opencyphal.org/u/jwwaite)\
**Post date:** [January 16, 2024, 12:28am UTC](https://forum.opencyphal.org/t/yakut-compile-and-monitor-errors/2069/1 "2024-01-16T00:28:53Z")

</div>

I’m having trouble installing Yakut on a Raspberry Pi 4, 64-bit (aarch64), Ubuntu 22.04, Python 3.10.12, which has can0 and can1, both CANFD. Two CANFD devices are on the bus, working normally sending only Heartbeats.

**Installed versions:**

```auto
$ nnvg --version
2.3.1

$ yakut --version
yakut, version 0.13.0

```

Environment:

```auto
$ cat env_cyphal.sh 
export PYCYPHAL_PATH="~/.pycyphal"
export YAKUT_PATH="~/.pycyphal/uavcan:~/.pycyphal/reg"
export UAVCAN __CAN__ IFACE='can0 can1'
export UAVCAN __CAN__ MTU=64
export UAVCAN __CAN__ BITRATE='1000000 5000000' # Arbitration and data segment bit rates.
export UAVCAN __NODE__ ID=2 # Yakut node-ID
echo "node-ID for this session: $UAVCAN __NODE__ ID"

```

**After unzipping the DSDL files, run:**

```auto
y -vv compile .cyphal/public_regulated_data_types-master/

```

**There is an error:**

```auto
2024-01-15 23:47:39 3956066 INF pydsdl._namespace: Reading 241 definitions from the root namespace public_regulated_data_types-master, with 241 lookup definitions located in root namespaces: public_regulated_data_types-master
2024-01-15 23:47:39 3956066 DEB pydsdl._dsdl_definition: public_regulated_data_types-master.reg.udral.physics.acoustics.Note.0.1: Starting processing with 240 lookup definitions located in root namespaces: public_regulated_data_types-master
UndefinedDataTypeError: /home/ares/.cyphal/public_regulated_data_types-master/reg/udral/physics/acoustics/Note.0.1.dsdl:6: Data type uavcan.si.unit.frequency.Scalar.1.0 could not be found in the following root namespaces: {'public_regulated_data_types-master'}. Please make sure that you specified the directories correctly.
2024-01-15 23:47:39 3956066 DEB yakut: EXCEPTION UndefinedDataTypeError: /home/ares/.cyphal/public_regulated_data_types-master/reg/udral/physics/acoustics/Note.0.1.dsdl:6: Data type uavcan.si.unit.frequency.Scalar.1.0 could not be found in the following root namespaces: {'public_regulated_data_types-master'}. Please make sure that you specified the directories correctly.

```

**I can run the compiler with success on just the uavcan folder:**

```auto
y -vv compile .cyphal/public_regulated_data_types-master/uavcan

```

**But not the reg folder:**

```auto
y -vv compile .cyphal/public_regulated_data_types-master/reg
2024-01-15 23:51:40 3959291 INF pydsdl._namespace: Reading 68 definitions from the root namespace reg, with 68 lookup definitions located in root namespaces: reg
2024-01-15 23:51:40 3959291 DEB pydsdl._dsdl_definition: reg.udral.physics.acoustics.Note.0.1: Starting processing with 67 lookup definitions located in root namespaces: reg
UndefinedDataTypeError: /home/ares/.cyphal/public_regulated_data_types-master/reg/udral/physics/acoustics/Note.0.1.dsdl:6: Data type uavcan.si.unit.frequency.Scalar.1.0 could not be found in the following root namespaces: {'reg'}. Please make sure that you specified the directories correctly.
2024-01-15 23:51:40 3959291 DEB yakut: EXCEPTION UndefinedDataTypeError: /home/ares/.cyphal/public_regulated_data_types-master/reg/udral/physics/acoustics/Note.0.1.dsdl:6: Data type uavcan.si.unit.frequency.Scalar.1.0 could not be found in the following root namespaces: {'reg'}. Please make sure that you specified the directories correctly.

```

**But even the compiled uavcan DSDL files will not load, as I get another error, that the compile still needs to be performed:**

```auto
$ y -vv mon
2024-01-15 23:55:50 3962649 DEB yakut: Path: ('/home/ares/~/.pycyphal/aivs', '/home/ares/~/.pycyphal/uavcan', '/home/ares/~/.pycyphal/reg')
2024-01-15 23:55:50 3962649 DEB asyncio: Using selector: EpollSelector
2024-01-15 23:55:50 3962649 DEB pycyphal.dsdl._import_hook: Attempting to load module scipy.linalg._cblas as DSDL
2024-01-15 23:55:50 3962649 DEB pycyphal.dsdl._import_hook: Attempting to load module scipy.linalg._fblas_64 as DSDL
2024-01-15 23:55:50 3962649 DEB pycyphal.dsdl._import_hook: Attempting to load module scipy.linalg._clapack as DSDL
2024-01-15 23:55:50 3962649 DEB pycyphal.dsdl._import_hook: Attempting to load module scipy.linalg._flapack_64 as DSDL
2024-01-15 23:55:50 3962649 DEB pycyphal.dsdl._import_hook: Attempting to load module scikits as DSDL
2024-01-15 23:55:50 3962649 DEB pycyphal.dsdl._import_hook: Attempting to load module uavcan as DSDL
2024-01-15 23:55:50 3962649 DEB yakut: Event loop finalization with exc=(<class 'click.exceptions.ClickException'>, ClickException("Run `yakut compile <path>/uavcan` to compile DSDL namespace 'uavcan'"), <traceback object at 0xffff8cc75640>)
Error: Run `yakut compile <path>/uavcan` to compile DSDL namespace 'uavcan'
2024-01-15 23:55:50 3962649 DEB yakut: EXIT 1

```

**I tried compiling the DSDLs using nnvg, which completed successfully:**

```auto
nnvg ~/.cyphal/public_regulated_data_types-master/reg --outdir ~/.pycyphal --target-language py -I ~/.cyphal/public_regulated_data_types-master/uavcan
nnvg ~/.cyphal/public_regulated_data_types-master/uavcan --outdir ~/.pycyphal --target-language py -I ~/.cyphal/public_regulated_data_types-master/reg

```

**But the same error occurs when I invoke monitor:**

```auto
$ y -vv monitor
2024-01-15 23:36:02 3946596 DEB yakut: Path: ('/home/ares/~/.pycyphal/aivs', '/home/ares/~/.pycyphal/uavcan', '/home/ares/~/.pycyphal/reg')
2024-01-15 23:36:02 3946596 DEB asyncio: Using selector: EpollSelector
2024-01-15 23:36:02 3946596 DEB pycyphal.dsdl._import_hook: Attempting to load module scipy.linalg._cblas as DSDL
2024-01-15 23:36:02 3946596 DEB pycyphal.dsdl._import_hook: Attempting to load module scipy.linalg._fblas_64 as DSDL
2024-01-15 23:36:02 3946596 DEB pycyphal.dsdl._import_hook: Attempting to load module scipy.linalg._clapack as DSDL
2024-01-15 23:36:02 3946596 DEB pycyphal.dsdl._import_hook: Attempting to load module scipy.linalg._flapack_64 as DSDL
2024-01-15 23:36:03 3946596 DEB pycyphal.dsdl._import_hook: Attempting to load module scikits as DSDL
2024-01-15 23:36:03 3946596 DEB pycyphal.dsdl._import_hook: Attempting to load module uavcan as DSDL
2024-01-15 23:36:03 3946596 DEB yakut: Event loop finalization with exc=(<class 'click.exceptions.ClickException'>, ClickException("Run `yakut compile <path>/uavcan` to compile DSDL namespace 'uavcan'"), <traceback object at 0xffffaff6a280>)
Error: Run `yakut compile <path>/uavcan` to compile DSDL namespace 'uavcan'
2024-01-15 23:36:03 3946596 DEB yakut: EXIT 1

```

**There must be some tool incompatibility on my system. How can I make compiled DSDL python files for use with yakut?**

---

<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:** [January 16, 2024, 9:51am UTC](https://forum.opencyphal.org/t/yakut-compile-and-monitor-errors/2069/2 "2024-01-16T09:51:13Z")

</div>

`yakut compile` is no longer needed, should no longer be used, and [will be removed soon](https://github.com/OpenCyphal/yakut/issues/63). Yakut sometimes emits unhelpful suggestions to use this command, but they will be removed as well. The correct approach is to set the `CYPHAL_PATH` environment variable such that it points where your DSDL definitions are; variables `PYCYPHAL_PATH` and `YAKUT_PATH` are not needed and should be unset.

```bash
export CYPHAL_PATH="~/.cyphal/public_regulated_data_types-master"
export UAVCAN __CAN__ IFACE='can0 can1'
export UAVCAN __CAN__ MTU=64
export UAVCAN __CAN__ BITRATE='1000000 5000000' # Arbitration and data segment bit rates.
export UAVCAN __NODE__ ID=2 # Yakut node-ID

```

---

<div class="post-metadata">

**Author:** ![jwwaite](https://forum.opencyphal.org/letter_avatar_proxy/v4/letter/j/7ab992/32.png) [@jwwaite](https://forum.opencyphal.org/u/jwwaite)\
**Post date:** [January 16, 2024, 11:42am UTC](https://forum.opencyphal.org/t/yakut-compile-and-monitor-errors/2069/3 "2024-01-16T11:42:42Z")

</div>

Thanks for the quick reply. That solved the compile issues.

Based on another Yakut error I set the interface to include channel number:

```auto
export UAVCAN __CAN__ IFACE="can0:1"

```

But still get another error:

```auto
pycyphal.transport._error.InvalidMediaConfigurationError: Interface not supported yet: can0

```

On this system:

```auto
$ ifconfig
can0: flags=193<UP,RUNNING,NOARP> mtu 72
        unspec 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 txqueuelen 10 (UNSPEC)
        RX packets 1262630 bytes 19694126 (19.6 MB)
        RX errors 0 dropped 0 overruns 0 frame 0
        TX packets 0 bytes 0 (0.0 B)
        TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
        device interrupt 54  

can1: flags=193<UP,RUNNING,NOARP> mtu 72
        unspec 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 txqueuelen 10 (UNSPEC)
        RX packets 0 bytes 0 (0.0 B)
        RX errors 0 dropped 0 overruns 0 frame 0
        TX packets 0 bytes 0 (0.0 B)
        TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
        device interrupt 55  

```

And candump() of two Cyphal nodes on can0:

```auto
$ candump can0
  can0 187D5506 [08] FF FF FF FF 00 00 00 EA
  can0 1864D406 [48] 78 56 CA 0C 1F A2 8A 48 78 CB 47 40 75 B9 56 B5 C3 92 5E C0 AE 47 E1 7A 14 E2 51 40 32 55 BE 40 79 58 0F 41 00 00 00 00 00 00 00 00 00 00 00 E8
  can0 107D5501 [8] 91 00 00 00 00 00 00 F1

```

How do I set the CAN interface name in Yakut?

---

<div class="post-metadata">

**Author:** ![jwwaite](https://forum.opencyphal.org/letter_avatar_proxy/v4/letter/j/7ab992/32.png) [@jwwaite](https://forum.opencyphal.org/u/jwwaite)\
**Post date:** [January 16, 2024, 12:33pm UTC](https://forum.opencyphal.org/t/yakut-compile-and-monitor-errors/2069/4 "2024-01-16T12:33:53Z")

</div>

Got it working:

```auto
export UAVCAN __CAN__ IFACE="socketcan:can0" # Use CAN can0 as transport layer
export UAVCAN __CAN__ BITRATE="1000000 5000000" # 5 Mbps

```

---

<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:** [January 16, 2024, 1:12pm UTC](https://forum.opencyphal.org/t/yakut-compile-and-monitor-errors/2069/5 "2024-01-16T13:12:43Z")

</div>

Well done. Next time please use rich formatting for code blocks when posting on the forum.
