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

Can't use CLI application #354

Closed
Lucifer25x opened this issue May 3, 2023 · 9 comments
Closed

Can't use CLI application #354

Lucifer25x opened this issue May 3, 2023 · 9 comments

Comments

@Lucifer25x
Copy link

Describe the bug
CLI app doesn't work at all. CLI app was working until I updated packages (most of them were python packages).

To Reproduce

  1. Open terminal
  2. Install protonvpn-cli using yay (or any other AUR helper)
  3. Run protonvpn-cli c

Expected behavior
I expected the app to open an interface and ask me for server location and after selecting location, the app should connect.

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

Traceback (most recent call last):
  File "/usr/lib/python3.11/importlib/metadata/__init__.py", line 563, in from_name
    return next(cls.discover(name=name))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
StopIteration

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/bin/protonvpn-cli", line 33, in <module>
    sys.exit(load_entry_point('protonvpn-cli==3.13.0', 'console_scripts', 'protonvpn-cli')())
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/bin/protonvpn-cli", line 22, in importlib_load_entry_point
    for entry_point in distribution(dist_name).entry_points
                       ^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/importlib/metadata/__init__.py", line 981, in distribution
    return Distribution.from_name(distribution_name)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/importlib/metadata/__init__.py", line 565, in from_name
    raise PackageNotFoundError(name)
importlib.metadata.PackageNotFoundError: No package metadata was found for protonvpn-cli

Desktop (please complete the following information):

  • OS: Arch Linux
  • Python Version: 3.11.3
  • ProtonVPN-CLI Version: 3.13.0
@stelgenhof
Copy link

stelgenhof commented May 3, 2023

Same here. There were tons of python package updates, which maybe the reason for this. (Also on ArchLinux).

Perhaps worth mentioning that the protonvpn-cli-community-git package in AUR is marked orphan (maintainer).

UPDATE: Reinstalling solved the issue for me (sudo pip3 install protonvpn-cli)

@Lucifer25x
Copy link
Author

Same here. There were tons of python package updates, which maybe the reason for this. (Also on ArchLinux).

Perhaps worth mentioning that the protonvpn-cli-community-git package in AUR is marked orphan (maintainer).

UPDATE: Reinstalling solved the issue for me (sudo pip3 install protonvpn-cli)

Hi, thanks for your reply. I also tried installing pip package, and actually that worked for me without a problem. But I have a little concern about installing pip packages as a sudo user, but maybe my concern is meaningless.

@stelgenhof
Copy link

stelgenhof commented May 4, 2023

I generally try to avoid any sudo operations as well, but I just followed the installations instructions of this project: https://github.com/Rafficer/linux-cli-community#installing-protonvpn-cli

@Jomosoto
Copy link

Jomosoto commented May 4, 2023

Reinstalling the AUR package solves the problem for me

Edit: I also told to make a new build while reinstalling, I don't know if this makes a difference

@Lucifer25x
Copy link
Author

Lucifer25x commented May 4, 2023

Reinstalling the AUR package solves the problem for me

Edit: I also told to make a new build while reinstalling, I don't know if this makes a difference

Thanks, I'll try it

@Jomosoto
Copy link

Jomosoto commented May 4, 2023

Found the reason for this problem: Python has been updated from 3.10 to 3.11. and the package has to be resetup for the new version. Packages from the official repos are automatically rebuilt, but for AUR packages, you have to rebuild them manually.

@Lucifer25x
Copy link
Author

Found the reason for this problem: Python has been updated from 3.10 to 3.11. and the package has to be resetup for the new version. Packages from the official repos are automatically rebuilt, but for AUR packages, you have to rebuild them manually.

Thanks

@wcrabtree9
Copy link

wcrabtree9 commented May 5, 2023

I reinstalled proton-cli from the AUR, ran pip install proton and now I get this message:

Traceback (most recent call last):
  File "/usr/bin/protonvpn-cli", line 33, in <module>
    sys.exit(load_entry_point('protonvpn-cli==3.13.0', 'console_scripts', 'protonvpn-cli')())
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/protonvpn_cli/main.py", line 20, in main
    from .cli import ProtonVPNCLI
  File "/usr/lib/python3.11/site-packages/protonvpn_cli/cli.py", line 4, in <module>
    from proton.constants import VERSION as proton_version
ModuleNotFoundError: No module named 'proton.constants'

Edit: uninstalled proton with pip, ran yay -S $(pacman -Qoq /usr/lib/python3.10), hit A for clean build of python-proton-client, and now it's working!

@Lucifer25x
Copy link
Author

I think that's time to close this issue as there's no need to keep it open.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants