Open twischer opened 3 years ago
It looks like those 1500000 lines got accidentally duplicated, and probably an earlier version of configparser was less picky
Try loading the latest version of the example config
Looks better thanks. But it is failing at another point, now.
$ ./cp210x-program -I testdata/cp2102-orig.ini --write-cp210x
Traceback (most recent call last):
File "/home/timo/Beschreibungen/HOWTOs/usb2serial/cp210x-program/./cp210x-program", line 239, in <module>
main()
File "/home/timo/Beschreibungen/HOWTOs/usb2serial/cp210x-program/./cp210x-program", line 235, in main
options.action(options)
File "/home/timo/Beschreibungen/HOWTOs/usb2serial/cp210x-program/./cp210x-program", line 173, in write_cp210x
dev.set_values(values)
File "/home/timo/Beschreibungen/HOWTOs/usb2serial/cp210x-program/cp210x/cp210x.py", line 358, in set_values
getattr(self, "set_" + name) (value)
File "/home/timo/Beschreibungen/HOWTOs/usb2serial/cp210x-program/cp210x/cp210x.py", line 312, in set_product_string
self._set_config_string(REG_PRODUCT_STRING, product_string,
File "/home/timo/Beschreibungen/HOWTOs/usb2serial/cp210x-program/cp210x/cp210x.py", line 217, in _set_config_string
self._set_config(value, data=chr(desc_size) + "\x03" + encoded)
TypeError: can only concatenate str (not "bytes") to str
Just merged a pull request to fix this error; want to try again?
Even better but not final
$ ./cp210x-program -I testdata/cp2102-orig.ini --write-cp210x
Traceback (most recent call last):
File "/home/timo/Beschreibungen/HOWTOs/usb2serial/cp210x-program/./cp210x-program", line 239, in <module>
main()
File "/home/timo/Beschreibungen/HOWTOs/usb2serial/cp210x-program/./cp210x-program", line 235, in main
options.action(options)
File "/home/timo/Beschreibungen/HOWTOs/usb2serial/cp210x-program/./cp210x-program", line 173, in write_cp210x
dev.set_values(values)
File "/home/timo/Beschreibungen/HOWTOs/usb2serial/cp210x-program/cp210x/cp210x.py", line 358, in set_values
getattr(self, "set_" + name) (value)
File "/home/timo/Beschreibungen/HOWTOs/usb2serial/cp210x-program/cp210x/cp210x.py", line 261, in set_baudrate_table
assert len(baudrates) == SIZE_BAUDRATES
AssertionError
But anyway already thanks a lot for the tool and your fast support.
possibly better so far on the packaging
branch:
$ source .tox/py38/bin/activate
(py38) $ ./cp210x-program -I testdata/cp2102-orig.ini --write-cp210x
No devices found
BUT, there's stll a bug in there somewhere, ie, the duplicate baud line is still generated.
@twischer Can you try again on latest master? I still don't have a legacy cp2102 (or 3) device for testing, so if you can give it spin that would be super helpful! :penguin: