I am working with the CANard library which can be found here: https://github.com/normaldotcom/CANard

I have correctly pip installed the module, but I am still getting an error and I am not sure why.

Here is my code:

from canard import can, bus
from canard.hw import socketcan
from canard.file import jsondb

parser = jsondb.JsonDbParser()
b = parser.parse('test_can.json')

CHANNEL = "can0"
dev = socketcan.SocketCanDev(CHANNEL)

while True:
    frame = dev.recv()
    signals = b.parse_frame(frame)
    if signals:
        for s in signals:

Here is the error:

ModuleNotFoundError: No module named 'canard.file'

canard.file does exist in the repo... any solution to this?

Thanks to all of those who reply in advance.

1 Answers

Kyle DeGennaro On Best Solutions

I was able to fix this by pip installing the git repo directly

pip install git+https://github.com/normaldotcom/CANard