0.1.5-dev not working flash
I made a backup of the u-boot partition, cleared the partition, tried to write it. As a result, such an error:
Traceback (most recent call last): File "/usr/lib/python3/site-packages/usb1/init.py", line 282, in create_initialised_buffer return string_type.from_buffer(init), init TypeError: memoryview: a bytes-like object is required, not 'str'
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "/usr/lib/python3/site-packages/rkflashkit/main.py", line 278, in __flash_image_file op.flash_image_file(offset, size, image_file) File "/usr/lib/python3/site-packages/rkflashkit/rktalk.py", line 306, in flash_image_file self.__flash_image_file(offset, size, fh) File "/usr/lib/python3/site-packages/rkflashkit/rktalk.py", line 289, in __flash_image_file self.__dev_handle.bulkWrite(self.__write_endpoint, str(buf)) File "/usr/lib/python3/site-packages/usb1/init.py", line 1500, in bulkWrite data, _ = create_initialised_buffer(data) File "/usr/lib/python3/site-packages/usb1/init.py", line 286, in create_initialised_buffer init = bytearray(init) TypeError: string argument without an encoding
I can confirm this happening here too anytime you want to flash. Reverting back to commit e43cb3dd63536f2147c0bc94ab39ff7147ecd40b which was before the python3 port makes it work again.
I had the same issue, here's how I fixedit:
src/rkflashkit/rktalk.py on line 289
+++ self.__dev_handle.bulkWrite(self.__write_endpoint, buf) # this works
--- self.__dev_handle.bulkWrite(self.__write_endpoint, str(buf))
I made a backup of the u-boot partition, cleared the partition, tried to write it. As a result, such an error:
Traceback (most recent call last): File "/usr/lib/python3/site-packages/usb1/init.py", line 282, in create_initialised_buffer return string_type.from_buffer(init), init TypeError: memoryview: a bytes-like object is required, not 'str'
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "/usr/lib/python3/site-packages/rkflashkit/main.py", line 278, in __flash_image_file op.flash_image_file(offset, size, image_file) File "/usr/lib/python3/site-packages/rkflashkit/rktalk.py", line 306, in flash_image_file self.__flash_image_file(offset, size, fh) File "/usr/lib/python3/site-packages/rkflashkit/rktalk.py", line 289, in __flash_image_file self.__dev_handle.bulkWrite(self.__write_endpoint, str(buf)) File "/usr/lib/python3/site-packages/usb1/init.py", line 1500, in bulkWrite data, _ = create_initialised_buffer(data) File "/usr/lib/python3/site-packages/usb1/init.py", line 286, in create_initialised_buffer init = bytearray(init) TypeError: string argument without an encoding