bri3d / a2l2xdf Goto Github PK
View Code? Open in Web Editor NEWConvert ASAP2 A2L files to TunerPro XDF files
Convert ASAP2 A2L files to TunerPro XDF files
Traceback (most recent call last):
File "d:\Data\a2l2xdf-master\a2l2xdf.py", line 6, in
from pya2l import DB, model
ImportError: cannot import name 'DB' from 'pya2l' (C:\Users\An\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\pya2l_init_.py)
I get a similar error message with all a2l files I have tested. What am I doing wrong?
$ python3 a2l2xdf.py sa.a2l a2l2xdf.csv
Traceback (most recent call last):
File "a2l2xdf.py", line 15, in <module>
db.open_existing(argv[1]) if path.exists(f"{argv[1]}db") else db.import_a2l(argv[1])
File "/home/chris/.local/lib/python3.7/site-packages/pya2l/__init__.py", line 115, in import_a2l
prepro_result = prepro.process(self._a2lfn, encoding = detect_encoding(self._a2lfn))
File "/home/chris/.local/lib/python3.7/site-packages/pya2l/preprocessor.py", line 160, in process
data = self._process_file(file_name, join_lines = True, encoding = encoding)
File "/home/chris/.local/lib/python3.7/site-packages/pya2l/preprocessor.py", line 173, in _process_file
for num, line in enumerate(f_obj, 1):
File "/usr/lib/python3.7/encodings/ascii.py", line 26, in decode
return codecs.ascii_decode(input, self.errors)[0]
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe4 in position 7497: ordinal not in range(128)
Traceback (most recent call last):
File "C:\Users\John\Downloads\a2l2xdf-master\a2l2xdf.py", line 15, in
db.open_existing(argv[1]) if path.exists(f"{argv[1]}db") else db.import_a2l(argv[1])
^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\John\AppData\Local\Programs\Python\Python312\Lib\site-packages\pya2l_init_.py", line 126, in import_a2l
self.db = a2l_parser.parseFromString(prepro_result.a2l_data, dbname = str(self._dbfn), encoding = encoding)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\John\AppData\Local\Programs\Python\Python312\Lib\site-packages\pya2l\parserlib.py", line 116, in parseFromString
return self.parse(antlr4.InputStream(buf), trace)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\John\AppData\Local\Programs\Python\Python312\Lib\site-packages\pya2l\parserlib.py", line 99, in parse
result = walker.walk(listener, tree)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\John\AppData\Local\Programs\Python\Python312\Lib\site-packages\antlr4\tree\Tree.py", line 160, in walk
self.walk(listener, child)
File "C:\Users\John\AppData\Local\Programs\Python\Python312\Lib\site-packages\antlr4\tree\Tree.py", line 160, in walk
self.walk(listener, child)
File "C:\Users\John\AppData\Local\Programs\Python\Python312\Lib\site-packages\antlr4\tree\Tree.py", line 160, in walk
self.walk(listener, child)
File "C:\Users\John\AppData\Local\Programs\Python\Python312\Lib\site-packages\antlr4\tree\Tree.py", line 161, in walk
self.exitRule(listener, t)
File "C:\Users\John\AppData\Local\Programs\Python\Python312\Lib\site-packages\antlr4\tree\Tree.py", line 188, in exitRule
ctx.exitRule(listener)
File "C:\Users\John\AppData\Local\Programs\Python\Python312\Lib\site-packages\pya2l\a2lParser.py", line 4990, in exitRule
listener.exitCharacteristic(self)
File "C:\Users\John\AppData\Local\Programs\Python\Python312\Lib\site-packages\pya2l\a2l_listener.py", line 487, in exitCharacteristic
address = ctx.address.value
^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'value'
Hey there,
Great work here, I'm not the best with python, so it was unclear to me how to use this correctly.
A quick look at the code makes me assume I call the a2l2xdf.py like so in terminal or cmd
python3 a2l2xdf.py mya2lfile.a2l thecsvfile.csv
which will then output the mya2lfile.xdf
I was unsure how I use the csv file correctly?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.