CSS-Electronics / can_decoder

API module for decoding raw CAN bus data to physical values
MIT License
74 stars 14 forks source link

Error in setup decoding file #2

Closed AnkithKala closed 3 years ago

AnkithKala commented 3 years ago

Hi

I am getting this below issue while running setup_decoding_rules.py file

arxml is not supported Traceback (most recent call last): File "C:\Users\kalaa\AppData\Local\Programs\Python\Python37\lib\site-packages\canmatrix\formats__init.py", line 27, in importlib.import_module("canmatrix.formats." + module) File "C:\Users\kalaa\AppData\Local\Programs\Python\Python37\lib\importlib__init.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 1006, in _gcd_import File "", line 983, in _find_and_load File "", line 967, in _find_and_load_unlocked File "", line 677, in _load_unlocked File "", line 728, in exec_module File "", line 219, in _call_with_frames_removed File "C:\Users\kalaa\AppData\Local\Programs\Python\Python37\lib\site-packages\canmatrix\formats\arxml.py", line 34, in import lxml.etree ModuleNotFoundError: No module named 'lxml' kcd is not supported Traceback (most recent call last): File "C:\Users\kalaa\AppData\Local\Programs\Python\Python37\lib\site-packages\canmatrix\formats__init.py", line 27, in importlib.import_module("canmatrix.formats." + module) File "C:\Users\kalaa\AppData\Local\Programs\Python\Python37\lib\importlib__init.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 1006, in _gcd_import File "", line 983, in _find_and_load File "", line 967, in _find_and_load_unlocked File "", line 677, in _load_unlocked File "", line 728, in exec_module File "", line 219, in _call_with_frames_removed File "C:\Users\kalaa\AppData\Local\Programs\Python\Python37\lib\site-packages\canmatrix\formats\kcd.py", line 35, in import lxml.etree ModuleNotFoundError: No module named 'lxml' fibex is not supported Traceback (most recent call last): File "C:\Users\kalaa\AppData\Local\Programs\Python\Python37\lib\site-packages\canmatrix\formats__init.py", line 27, in importlib.import_module("canmatrix.formats." + module) File "C:\Users\kalaa\AppData\Local\Programs\Python\Python37\lib\importlib__init__.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 1006, in _gcd_import File "", line 983, in _find_and_load File "", line 967, in _find_and_load_unlocked File "", line 677, in _load_unlocked File "", line 728, in exec_module File "", line 219, in _call_with_frames_removed File "C:\Users\kalaa\AppData\Local\Programs\Python\Python37\lib\site-packages\canmatrix\formats\fibex.py", line 33, in import lxml.etree ModuleNotFoundError: No module named 'lxml' xls is not supported Traceback (most recent call last): File "C:\Users\kalaa\AppData\Local\Programs\Python\Python37\lib\site-packages\canmatrix\formats__init__.py", line 27, in importlib.import_module("canmatrix.formats." + module) File "C:\Users\kalaa\AppData\Local\Programs\Python\Python37\lib\importlib\init__.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 1006, in _gcd_import File "", line 983, in _find_and_load File "", line 967, in _find_and_load_unlocked File "", line 677, in _load_unlocked File "", line 728, in exec_module File "", line 219, in _call_with_frames_removed File "C:\Users\kalaa\AppData\Local\Programs\Python\Python37\lib\site-packages\canmatrix\formats\xls.py", line 34, in import xlrd ModuleNotFoundError: No module named 'xlrd' xlsx is not supported Traceback (most recent call last): File "C:\Users\kalaa\AppData\Local\Programs\Python\Python37\lib\site-packages\canmatrix\formats\init__.py", line 27, in importlib.import_module("canmatrix.formats." + module) File "C:\Users\kalaa\AppData\Local\Programs\Python\Python37\lib\importlib\init__.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 1006, in _gcd_import File "", line 983, in _find_and_load File "", line 967, in _find_and_load_unlocked File "", line 677, in _load_unlocked File "", line 728, in exec_module File "", line 219, in _call_with_frames_removed File "C:\Users\kalaa\AppData\Local\Programs\Python\Python37\lib\site-packages\canmatrix\formats\xlsx.py", line 32, in import xlsxwriter ModuleNotFoundError: No module named 'xlsxwriter' yaml is not supported Traceback (most recent call last): File "C:\Users\kalaa\AppData\Local\Programs\Python\Python37\lib\site-packages\canmatrix\formats\init__.py", line 27, in importlib.import_module("canmatrix.formats." + module) File "C:\Users\kalaa\AppData\Local\Programs\Python\Python37\lib\importlib\init__.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 1006, in _gcd_import File "", line 983, in _find_and_load File "", line 967, in _find_and_load_unlocked File "", line 677, in _load_unlocked File "", line 728, in exec_module File "", line 219, in _call_with_frames_removed File "C:\Users\kalaa\AppData\Local\Programs\Python\Python37\lib\site-packages\canmatrix\formats\yaml.py", line 32, in import yaml ModuleNotFoundError: No module named 'yaml' Traceback (most recent call last): File "C:\Users\kalaa\OneDrive\Desktop\can_decoder\examples\setup_decoding_rules.py", line 143, in example_setup_decoding_rules_j1939() File "C:\Users\kalaa\OneDrive\Desktop\can_decoder\examples\setup_decoding_rules.py", line 72, in example_setup_decoding_rules_j1939 decoded_result = decode_using_rules(handle, db) File "C:\Users\kalaa\OneDrive\Desktop\can_decoder\examples\setup_decoding_rules.py", line 30, in decode_using_rules mdf_file = mdf_iter.MdfFile(handle) RuntimeError: Buffer error

MatinF commented 3 years ago

Hi there, can you please share the full script, log file and DBC file you're trying to use?

dapperfu commented 3 years ago

From the debug error it looks like you're missing a lot of requirements.

yaml, lxml, & xlsxwriter

Could you install those and try again?

MatinF commented 3 years ago

Closing issue as no further info provided