Zylquinal / protonvpn-bin

An unofficial ProtonVPN Package for Arch Linux
20 stars 2 forks source link

protonvpn-app fails to start with python error. Missing dependency maybe? #3

Closed queenbiscuit311 closed 1 year ago

queenbiscuit311 commented 1 year ago

The PKGBUILD builds and installs fine, but the program fails to actually work. Here's the terminal output:

  warnings.warn("urllib3 ({}) or chardet ({})/charset_normalizer ({}) doesn't match a supported "
Traceback (most recent call last):
  File "/usr/bin/protonvpn-app", line 33, in <module>
    sys.exit(load_entry_point('proton-vpn-gtk-app==4.0.0', 'console_scripts', 'protonvpn-app')())
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/bin/protonvpn-app", line 25, in importlib_load_entry_point
    return next(matches).load()
           ^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/importlib/metadata/__init__.py", line 202, in load
    module = import_module(match.group('module'))
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen importlib._bootstrap>", line 1204, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1176, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1126, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "<frozen importlib._bootstrap>", line 1204, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1176, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1126, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "<frozen importlib._bootstrap>", line 1204, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1176, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1126, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "<frozen importlib._bootstrap>", line 1204, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1176, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1126, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "<frozen importlib._bootstrap>", line 1204, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1176, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1147, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 690, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 940, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "/usr/lib/python3.11/site-packages/proton/__init__.py", line 1, in <module>
    from .api import Session # noqa
    ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/proton/api.py", line 29, in <module>
    from .metadata import MetadataBackend
  File "/usr/lib/python3.11/site-packages/proton/metadata/__init__.py", line 1, in <module>
    from . import textfile_metadata # noqa
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/proton/metadata/textfile_metadata.py", line 6, in <module>
    from ._base import MetadataBackend
  File "/usr/lib/python3.11/site-packages/proton/metadata/_base.py", line 2, in <module>
    from ..utils import SubclassesMixin
ImportError: cannot import name 'SubclassesMixin' from 'proton.utils' (/usr/lib/python3.11/site-packages/proton/utils/__init__.py)
queenbiscuit311 commented 1 year ago

I made sure to install everything from the PKGBUILD, but if that's not the issue then something must be wrong with upsteam I would guess.

Zylquinal commented 1 year ago

Can you try https://github.com/Zylquinal/protonvpn-bin/tree/dep-fix

Zylquinal commented 1 year ago

image

It works for me, what about you?

EchterAlsFake commented 1 year ago

For me the problem was always that I had some old protonvpn packages installed. Make sure to uninstall them all, delete the python lib files and then reboot your computer before installing protonvpn-bin.

1) sudo pacman -R protonvpn protonvpn-cli protonvpn-gui protonvpn-bin 2) sudo rm -rf /usr/lib/python3.11/site-packages/proton 3) reboot 4) git clone https://github.com/Zylquinal/protonvpn-bin 5) makepkg -si

I can't test it right now, but that's what worked for me in the past.

Zylquinal commented 1 year ago

For me the problem was always that I had some old protonvpn packages installed. Make sure to uninstall them all, delete the python lib files and then reboot your computer before installing protonvpn-bin.

1. sudo pacman -R protonvpn protonvpn-cli protonvpn-gui protonvpn-bin

2. sudo rm -rf /usr/lib/python3.11/site-packages/proton

3. reboot

4. git clone https://github.com/Zylquinal/protonvpn-bin

5. makepkg -si

I can't test it right now, but that's what worked for me in the past.

image

Tested, and it's indeed caused by old protonvpn version, never use one so i never realize about it.

queenbiscuit311 commented 1 year ago

Can confirm, those instructions fixed it. Thanks!