Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] critical error on macOS today #139

Closed
kndol opened this issue Oct 27, 2023 · 5 comments
Closed

[BUG] critical error on macOS today #139

kndol opened this issue Oct 27, 2023 · 5 comments
Assignees
Labels
bug 🐛 A real glitch has been found
Milestone

Comments

@kndol
Copy link

kndol commented Oct 27, 2023

Describe the bug
Traceback (most recent call last):
File "/usr/local/bin/archey", line 8, in
sys.exit(main())
^^^^^^
File "/usr/local/Cellar/archey4/4.14.2.0/libexec/lib/python3.12/site-packages/archey/main.py", line 185, in main
for entry_instance in mapper(_entry_instantiator, available_entries):
File "/usr/local/Cellar/python@3.12/3.12.0/Frameworks/Python.framework/Versions/3.12/lib/python3.12/concurrent/futures/_base.py", line 619, in result_iterator
yield _result_or_cancel(fs.pop())
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/Cellar/python@3.12/3.12.0/Frameworks/Python.framework/Versions/3.12/lib/python3.12/concurrent/futures/_base.py", line 317, in _result_or_cancel
return fut.result(timeout)
^^^^^^^^^^^^^^^^^^^
File "/usr/local/Cellar/python@3.12/3.12.0/Frameworks/Python.framework/Versions/3.12/lib/python3.12/concurrent/futures/_base.py", line 449, in result
return self.__get_result()
^^^^^^^^^^^^^^^^^^^
File "/usr/local/Cellar/python@3.12/3.12.0/Frameworks/Python.framework/Versions/3.12/lib/python3.12/concurrent/futures/_base.py", line 401, in __get_result
raise self._exception
File "/usr/local/Cellar/python@3.12/3.12.0/Frameworks/Python.framework/Versions/3.12/lib/python3.12/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/Cellar/archey4/4.14.2.0/libexec/lib/python3.12/site-packages/archey/main.py", line 159, in _entry_instantiator
return Entries[entry.pop("type")].value(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/Cellar/archey4/4.14.2.0/libexec/lib/python3.12/site-packages/archey/entries/disk.py", line 20, in init
self._disk_dict = self._get_df_output_dict()
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/Cellar/archey4/4.14.2.0/libexec/lib/python3.12/site-packages/archey/entries/disk.py", line 175, in _get_df_output_dict
df_output = run(
^^^^
File "/usr/local/Cellar/python@3.12/3.12.0/Frameworks/Python.framework/Versions/3.12/lib/python3.12/subprocess.py", line 550, in run
stdout, stderr = process.communicate(input, timeout=timeout)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/Cellar/python@3.12/3.12.0/Frameworks/Python.framework/Versions/3.12/lib/python3.12/subprocess.py", line 1196, in communicate
stdout = self.stdout.read()
^^^^^^^^^^^^^^^^^^
File "", line 322, in decode
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xa0 in position 1139: invalid start byte

Environment

  • Version used (4.X.Y.Z) : 4.14.2.0
  • Method of installation (distribution package, PyPI, Homebrew, sources) : Homebrew
  • Hardware type (laptop, server, Raspberry, hyper-visor) : MacBook Pro 16" 2019
  • Python version (3.Y.Z) : 3.12.0
  • Operating system and version : 14.0
  • Connectivity (off-line, LAN only, Internet access) : Internet access

Today I suddenly got this error.

@HorlogeSkynet
Copy link
Owner

Hello, could you attach here the output of LANG=C df -P -k ? Do you have any external drive currently connected ? 🙂

@kndol
Copy link
Author

kndol commented Oct 27, 2023

Filesystem 1024-blocks Used Available Capacity Mounted on
/dev/disk1s2s1 976797816 9588148 29831932 25% /
devfs 205 205 0 100% /dev
/dev/disk1s3 976797816 2148496 29831932 7% /System/Volumes/Preboot
/dev/disk1s5 976797816 24 29831932 1% /System/Volumes/VM
/dev/disk1s6 976797816 16708 29831932 1% /System/Volumes/Update
/dev/disk1s1 976797816 933822656 29831932 97% /System/Volumes/Data
map auto_home 0 0 0 100% /System/Volumes/Data/home
com.apple.TimeMachine.2023-10-27-213650.local@/dev/disk1s1 976797816 911264492 29831932 97% /Volumes/com.apple.TimeMachine.localsnapshots/Backups.backupdb/?????????? MacBook�Pro 16"/2023-10-27-213650/Macintosh HD - ??????
com.apple.TimeMachine.2023-10-27-182111.local@/dev/disk1s1 976797816 908373184 29831932 97% /Volumes/com.apple.TimeMachine.localsnapshots/Backups.backupdb/?????????? MacBook�Pro 16"/2023-10-27-182111/Macintosh HD - ??????
/dev/disk5s1 8718336 7887792 803712 91% /Library/Developer/CoreSimulator/Volumes/iOS_21A328
/dev/disk7s1 16721920 16196960 481864 98% /Library/Developer/CoreSimulator/Volumes/iOS_21A342
/dev/disk2s2 3906682672 2789712872 1116969800 72% /Volumes/External
/dev/disk3s2 2929930672 2843197032 86733640 98% /Volumes/Time Machine
com.apple.TimeMachine.2023-10-27-230230.local@/dev/disk1s1 976797816 912667300 29831932 97% /Volumes/com.apple.TimeMachine.localsnapshots/Backups.backupdb/?????????? MacBook�Pro 16"/2023-10-27-230230/Macintosh HD - ??????
com.apple.TimeMachine.2023-10-17-235621.local@/dev/disk1s1 976797816 873322368 29831932 97% /Volumes/com.apple.TimeMachine.localsnapshots/Backups.backupdb/?????????? MacBook�Pro 16"/2023-10-17-235621/Macintosh HD - ??????
com.apple.TimeMachine.2023-10-27-223709.local@/dev/disk1s1 976797816 911598632 29831932 97% /Volumes/com.apple.TimeMachine.localsnapshots/Backups.backupdb/?????????? MacBook�Pro 16"/2023-10-27-223709/Macintosh HD - ??????

Yes, external drives are connected.

@HorlogeSkynet
Copy link
Owner

So it looks like your Time Machine's backup volume paths contain somehow Unicode characters (recent system upgrade ? Or hostname change ?).

If you can edit project sources, or are able to Git clone it, could you try modifying disk.py to add encoding="utf-8" to subprocess.run call ?

@HorlogeSkynet HorlogeSkynet added the bug 🐛 A real glitch has been found label Oct 30, 2023
@HorlogeSkynet HorlogeSkynet self-assigned this Oct 30, 2023
@kndol
Copy link
Author

kndol commented Nov 2, 2023

I upgraded system to 14.0 recentely. And your answer is the solution for this problem.

@HorlogeSkynet
Copy link
Owner

Thanks for your feedback, I'll try to patch this ASAP 🙏

@HorlogeSkynet HorlogeSkynet added this to the v4.14.3.0 milestone Jan 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 A real glitch has been found
Projects
None yet
Development

No branches or pull requests

2 participants