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] archey4 can't handle filesystems with spaces #103

Closed
josefschabasser opened this issue Oct 12, 2021 · 3 comments · Fixed by #102
Closed

[BUG] archey4 can't handle filesystems with spaces #103

josefschabasser opened this issue Oct 12, 2021 · 3 comments · Fixed by #102
Assignees
Labels
bug 🐛 A real glitch has been found

Comments

@josefschabasser
Copy link

Describe the bug
archey4 does not support filesystems with spaces in their names. rclone (a tool to work with and mount cloud storage) allows to create filesystems with spaces in their names and archey4 fails to parse df's output. Furthermore, rclone always puts a : at the end of the filesystems name, maybe this helps in some way.

rclone configuration:

[OneDrive Business]
type = onedrive
...

df output:

Dateisystem                1K-Blöcke   Benutzt     Verfügbar Verw% Eingehängt auf
OneDrive Business:        1073741824   1511724    1072230100    1% /home/[USER]/rclone/OneDrive Business

archey4 output:

WARNING: [archey.entries.temperature] [lm-sensors]: ERROR: Can't get value of subfeature temp1_input: Can't read
Traceback (most recent call last):
  File "/usr/bin/archey", line 33, in <module>
    sys.exit(load_entry_point('archey4==4.13.1', 'console_scripts', 'archey')())
  File "/usr/lib/python3.9/site-packages/archey/__main__.py", line 168, in main
    for entry_instance in mapper(_entry_instantiator, available_entries):
  File "/usr/lib/python3.9/concurrent/futures/_base.py", line 608, in result_iterator
    yield fs.pop().result()
  File "/usr/lib/python3.9/concurrent/futures/_base.py", line 438, in result
    return self.__get_result()
  File "/usr/lib/python3.9/concurrent/futures/_base.py", line 390, in __get_result
    raise self._exception
  File "/usr/lib/python3.9/concurrent/futures/thread.py", line 52, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/lib/python3.9/site-packages/archey/__main__.py", line 144, in _entry_instantiator
    return Entries[entry.pop('type')].value(
  File "/usr/lib/python3.9/site-packages/archey/entries/disk.py", line 18, in __init__
    self._disk_dict = self._get_df_output_dict()
  File "/usr/lib/python3.9/site-packages/archey/entries/disk.py", line 133, in _get_df_output_dict
    'total_blocks': int(columns[1])
ValueError: invalid literal for int() with base 10: 'Business:'

Expected behavior
archey4 shouldn't fail. Maybe display local storage only and print a warning that some filesystems were ignored.

Screenshots
Please see the error message above.

Environment

  • Version used (4.Y.Z) : v4.13.1
  • Method of installation (distribution package, PyPI, Homebrew, sources) : AUR package
  • Hardware type (laptop, server, Raspberry, hyper-visor) : laptop
  • Python version (3.Y.Z) : 3.9.7
  • Operating system and version : Manjaro Linux (rolling, up2date)
  • Graphical environment name and version : GNOME 40.4.0
  • Connectivity (off-line, LAN only, Internet access) : LAN

Additional context

@josefschabasser josefschabasser changed the title [BUG] [BUG] archey4 can't handle filesystems with spaces Oct 12, 2021
@josefschabasser
Copy link
Author

I see there's already a PR for this: #102

@HorlogeSkynet
Copy link
Owner

Hi Josef, thanks for opening this up. Indeed a PR is already on its way to fix this issue. You can expect a new release shipping this patch within the following days. Bye 👋

@HorlogeSkynet HorlogeSkynet self-assigned this Oct 12, 2021
@HorlogeSkynet HorlogeSkynet added the bug 🐛 A real glitch has been found label Oct 12, 2021
@HorlogeSkynet HorlogeSkynet linked a pull request Oct 12, 2021 that will close this issue
5 tasks
@HorlogeSkynet
Copy link
Owner

Released as v4.13.2 @josefschabasser. Bye 👋

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
Status: DONE
Development

Successfully merging a pull request may close this issue.

2 participants