Hi,
I've encountered the following exception on running fastboot.Download(filename) with python 3.6:
Traceback (most recent call last):
File "python-adb/adb/fastboot.py", line 326, in Download
source_file, source_len, info_cb, progress_callback=progress_callback)
File "python-adb/adb/fastboot.py", line 137, in HandleDataSending
self._Write(source_file, accepted_size, progress_callback)
File "python-adb/adb/fastboot.py", line 195, in _Write
tmp = data.read(self.chunk_kb * 1024)
File "/usr/lib/python3.6/codecs.py", line 321, in decode
(result, consumed) = self._buffer_decode(data, self.errors, final)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x9b in position 7: invalid start byte
Changing source_file = open(source_file) to source_file = open(source_file, mode='rb') fix the problem, not sure if this is really a bug or by-design though.
Hi, I've encountered the following exception on running
fastboot.Download(filename)
with python 3.6:Changing
source_file = open(source_file)
tosource_file = open(source_file, mode='rb')
fix the problem, not sure if this is really a bug or by-design though.