Rafficer / linux-cli-community

Linux command-line client for ProtonVPN. Written in Python.
https://protonvpn.com
GNU General Public License v3.0
1.31k stars 198 forks source link

[BUG] importlib.metadata.PackageNotFoundError #229

Closed AnkS4 closed 4 years ago

AnkS4 commented 4 years ago

Describe the bug Getting importlib.metadata.PackageNotFoundError: protonvpn-cli error.

To Reproduce Steps to reproduce the behavior:

  1. Clone the repository, cd linux-cli, pip3 install -e .
  2. Enter sudo protonvpn init
  3. See error

Expected behavior Initialize without error.

Error Messages/Program Output/Log Messages (~/.pvpn-cli/pvpn-cli.log)

Traceback (most recent call last):
  File "/home/anks/.local/bin/protonvpn", line 33, in <module>
    sys.exit(load_entry_point('protonvpn-cli', 'console_scripts', 'protonvpn')())
  File "/home/anks/.local/bin/protonvpn", line 22, in importlib_load_entry_point
    for entry_point in distribution(dist_name).entry_points
  File "/usr/lib/python3.8/importlib/metadata.py", line 504, in distribution
    return Distribution.from_name(distribution_name)
  File "/usr/lib/python3.8/importlib/metadata.py", line 177, in from_name
    raise PackageNotFoundError(name)
importlib.metadata.PackageNotFoundError: protonvpn-cli

Desktop:

Additional Information: Without sudo I'm getting this output:

$ protonvpn init
[!] The program was not executed as root.
[!] Please run as root.
Rafficer commented 4 years ago

Did you install it with sudo, so it's system wide?

AnkS4 commented 4 years ago

No.

That might be the reason.