ebroecker / canmatrix

Converting Can (Controller Area Network) Database Formats .arxml .dbc .dbf .kcd ...
BSD 2-Clause "Simplified" License
924 stars 399 forks source link

Imports error on Python 3.8.3 #521

Closed fskoras closed 4 years ago

fskoras commented 4 years ago

I have freshly installed canmatrix with command

pip install canmatrix

when I tried to import the module I got the below error message

import canmatrix arxml is not supported Traceback (most recent call last): File "D:\Tools\Python\Python38\lib\site-packages\canmatrix\formats__init.py", line 27, in importlib.import_module("canmatrix.formats." + module) File "D:\Tools\Python\Python38\lib\importlib__init.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 1014, in _gcd_import File "", line 991, in _find_and_load File "", line 975, in _find_and_load_unlocked File "", line 671, in _load_unlocked File "", line 783, in exec_module File "", line 219, in _call_with_frames_removed File "D:\Tools\Python\Python38\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 "D:\Tools\Python\Python38\lib\site-packages\canmatrix\formats__init.py", line 27, in importlib.import_module("canmatrix.formats." + module) File "D:\Tools\Python\Python38\lib\importlib__init.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 1014, in _gcd_import File "", line 991, in _find_and_load File "", line 975, in _find_and_load_unlocked File "", line 671, in _load_unlocked File "", line 783, in exec_module File "", line 219, in _call_with_frames_removed File "D:\Tools\Python\Python38\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 "D:\Tools\Python\Python38\lib\site-packages\canmatrix\formats__init.py", line 27, in importlib.import_module("canmatrix.formats." + module) File "D:\Tools\Python\Python38\lib\importlib__init__.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 1014, in _gcd_import File "", line 991, in _find_and_load File "", line 975, in _find_and_load_unlocked File "", line 671, in _load_unlocked File "", line 783, in exec_module File "", line 219, in _call_with_frames_removed File "D:\Tools\Python\Python38\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 "D:\Tools\Python\Python38\lib\site-packages\canmatrix\formats__init__.py", line 27, in importlib.import_module("canmatrix.formats." + module) File "D:\Tools\Python\Python38\lib\importlib\init__.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 1014, in _gcd_import File "", line 991, in _find_and_load File "", line 975, in _find_and_load_unlocked File "", line 671, in _load_unlocked File "", line 783, in exec_module File "", line 219, in _call_with_frames_removed File "D:\Tools\Python\Python38\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 "D:\Tools\Python\Python38\lib\site-packages\canmatrix\formats\init__.py", line 27, in importlib.import_module("canmatrix.formats." + module) File "D:\Tools\Python\Python38\lib\importlib\init__.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 1014, in _gcd_import File "", line 991, in _find_and_load File "", line 975, in _find_and_load_unlocked File "", line 671, in _load_unlocked File "", line 783, in exec_module File "", line 219, in _call_with_frames_removed File "D:\Tools\Python\Python38\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 "D:\Tools\Python\Python38\lib\site-packages\canmatrix\formats\init__.py", line 27, in importlib.import_module("canmatrix.formats." + module) File "D:\Tools\Python\Python38\lib\importlib\init__.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 1014, in _gcd_import File "", line 991, in _find_and_load File "", line 975, in _find_and_load_unlocked File "", line 671, in _load_unlocked File "", line 783, in exec_module File "", line 219, in _call_with_frames_removed File "D:\Tools\Python\Python38\lib\site-packages\canmatrix\formats\yaml.py", line 32, in import yaml ModuleNotFoundError: No module named 'yaml'

ebroecker commented 4 years ago

Hi,

you need to install the requirements also. https://canmatrix.readthedocs.io/en/latest/installation.html

pip install lxml, xlrd, ....

fskoras commented 4 years ago

That worked thanks.