UnicodeDecodeError: 'utf-8' codec can't decode byte 0xa0 in position 56: invalid start byte
Opened this issue · 4 comments
W-quan commented
Traceback (most recent call last):
File "/usr/local/bin/adbsync", line 8, in <module>
sys.exit(main())
^^^^^^
File "/usr/local/lib/python3.11/site-packages/BetterADBSync/__init__.py", line 379, in main
files_tree_destination = fs_destination.get_files_tree(path_destination, follow_links = args.copy_links)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/BetterADBSync/FileSystems/Base.py", line 45, in get_files_tree
return self._get_files_tree(tree_path, statObject, follow_links = follow_links)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/BetterADBSync/FileSystems/Base.py", line 33, in _get_files_tree
tree[filename] = self._get_files_tree(
^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/BetterADBSync/FileSystems/Base.py", line 30, in _get_files_tree
for filename, stat_object_child, in self.lstat_in_dir(tree_path):
File "/usr/local/lib/python3.11/site-packages/BetterADBSync/FileSystems/Android.py", line 176, in lstat_in_dir
for line in self.adb_shell(["ls", "-la", path]):
File "/usr/local/lib/python3.11/site-packages/BetterADBSync/FileSystems/Android.py", line 87, in adb_shell
adb_line = adb_line.decode(self.adb_encoding).rstrip("\r\n")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xa0 in position 56: invalid start byte
After adbsync push failed. rerun adbsync push
get this error.
spectrMeltdown commented
I'm also getting this error
Vadworks commented
This might be to do with python version, I had this error, and after upgrading python and pip it went away
antonbo commented
Still happens with Python 3.12.2. Using on MacOS via pipx
File "/Users/x/.local/pipx/venvs/betteradbsync/lib/python3.12/site-packages/BetterADBSync/FileSystems/Android.py", line 176, in lstat_in_dir
for line in self.adb_shell(["ls", "-la", path]):
File "/Users/x/.local/pipx/venvs/betteradbsync/lib/python3.12/site-packages/BetterADBSync/FileSystems/Android.py", line 87, in adb_shell
adb_line = adb_line.decode(self.adb_encoding).rstrip("\r\n")
I have non-English names on my device