无法启动 Proton VPN

无法启动 Proton VPN

如果我尝试通过单击图标来打开 proton,什么都不会发生,而如果我使用终端并输入 protonvpn,我会看到充满异常和错误的页面。

Traceback (most recent call last):
  File "/usr/bin/protonvpn", line 11, in <module>
    load_entry_point('protonvpn-gui==1.12.0', 'console_scripts', 'protonvpn')()
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 490, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 2854, in load_entry_point
    return ep.load()
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 2445, in load
    return self.resolve()
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 2451, in resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
  File "/usr/lib/python3/dist-packages/protonvpn_gui/main.py", line 14, in <module>
    from proton.constants import VERSION as proton_version
  File "/usr/lib/python3/dist-packages/proton/__init__.py", line 1, in <module>
    from .api import Session # noqa
  File "/usr/lib/python3/dist-packages/proton/api.py", line 6, in <module>
    import requests
  File "/usr/lib/python3/dist-packages/requests/__init__.py", line 95, in <module>
    from urllib3.contrib import pyopenssl
  File "/usr/lib/python3/dist-packages/urllib3/contrib/pyopenssl.py", line 46, in <module>
    import OpenSSL.SSL
  File "/usr/lib/python3/dist-packages/OpenSSL/__init__.py", line 8, in <module>
    from OpenSSL import crypto, SSL
  File "/usr/lib/python3/dist-packages/OpenSSL/crypto.py", line 1553, in <module>
    class X509StoreFlags(object):
  File "/usr/lib/python3/dist-packages/OpenSSL/crypto.py", line 1573, in X509StoreFlags
    CB_ISSUER_CHECK = _lib.X509_V_FLAG_CB_ISSUER_CHECK
AttributeError: module 'lib' has no attribute 'X509_V_FLAG_CB_ISSUER_CHECK'
Error in sys.excepthook:
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/apport_python_hook.py", line 72, in apport_excepthook
    from apport.fileutils import likely_packaged, get_recent_crashes
  File "/usr/lib/python3/dist-packages/apport/__init__.py", line 5, in <module>
    from apport.report import Report
  File "/usr/lib/python3/dist-packages/apport/report.py", line 32, in <module>
    import apport.fileutils
  File "/usr/lib/python3/dist-packages/apport/fileutils.py", line 12, in <module>
    import os, glob, subprocess, os.path, time, pwd, sys, requests_unixsocket
  File "/usr/lib/python3/dist-packages/requests_unixsocket/__init__.py", line 1, in <module>
    import requests
  File "/usr/lib/python3/dist-packages/requests/__init__.py", line 95, in <module>
    from urllib3.contrib import pyopenssl
  File "/usr/lib/python3/dist-packages/urllib3/contrib/pyopenssl.py", line 46, in <module>
    import OpenSSL.SSL
  File "/usr/lib/python3/dist-packages/OpenSSL/__init__.py", line 8, in <module>
    from OpenSSL import crypto, SSL
  File "/usr/lib/python3/dist-packages/OpenSSL/crypto.py", line 1553, in <module>
    class X509StoreFlags(object):
  File "/usr/lib/python3/dist-packages/OpenSSL/crypto.py", line 1573, in X509StoreFlags
    CB_ISSUER_CHECK = _lib.X509_V_FLAG_CB_ISSUER_CHECK
AttributeError: module 'lib' has no attribute 'X509_V_FLAG_CB_ISSUER_CHECK'

Original exception was:
Traceback (most recent call last):
  File "/usr/bin/protonvpn", line 11, in <module>
    load_entry_point('protonvpn-gui==1.12.0', 'console_scripts', 'protonvpn')()
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 490, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 2854, in load_entry_point
    return ep.load()
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 2445, in load
    return self.resolve()
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 2451, in resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
  File "/usr/lib/python3/dist-packages/protonvpn_gui/main.py", line 14, in <module>
    from proton.constants import VERSION as proton_version
  File "/usr/lib/python3/dist-packages/proton/__init__.py", line 1, in <module>
    from .api import Session # noqa
  File "/usr/lib/python3/dist-packages/proton/api.py", line 6, in <module>
    import requests
  File "/usr/lib/python3/dist-packages/requests/__init__.py", line 95, in <module>
    from urllib3.contrib import pyopenssl
  File "/usr/lib/python3/dist-packages/urllib3/contrib/pyopenssl.py", line 46, in <module>
    import OpenSSL.SSL
  File "/usr/lib/python3/dist-packages/OpenSSL/__init__.py", line 8, in <module>
    from OpenSSL import crypto, SSL
  File "/usr/lib/python3/dist-packages/OpenSSL/crypto.py", line 1553, in <module>
    class X509StoreFlags(object):
  File "/usr/lib/python3/dist-packages/OpenSSL/crypto.py", line 1573, in X509StoreFlags
    CB_ISSUER_CHECK = _lib.X509_V_FLAG_CB_ISSUER_CHECK
AttributeError: module 'lib' has no attribute 'X509_V_FLAG_CB_ISSUER_CHECK'

我尝试重新安装它,但同样的问题仍然存在。

更新:我已更新 pyopenssl,之后应用程序启动。但现在 GUI 显示“加载服务器时出错”“Nonetype 对象没有属性获取”

因此我检查了日志文件并发现:

2023-01-17 06:02:56,525 — dashboard.py — ERROR —check_if_events_should_be_displayed:221 — 'NoneType' object has no attribute 'get'
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/protonvpn_gui/view_model/dashboard.py", line 215, in check_if_events_should_be_displayed
    all_notitications = protonvpn.get_session().get_all_notifications()
  File "/usr/lib/python3/dist-packages/protonvpn_nm_lib/core/session/session.py", line 883, in get_all_notifications
    self._notifications.get_all_notifications()
  File "/usr/lib/python3/dist-packages/protonvpn_nm_lib/core/notification/notifications.py", line 47, in get_all_notifications
    notifications = self.__data.get("Notifications", None)
AttributeError: 'NoneType' object has no attribute 'get'
2023-01-17 06:04:32,980 — main.py — INFO —do_startup:75 — 

答案1

也许你应该检查一下 protonvpn 的依赖项,来自github 上的 protonvpn-nm-lib

确保您的服务器上的包匹配。

答案2

发生这种情况的原因是 pyOpenSSL 软件包版本 22 导致加密软件包 (2.8) 出现问题。我将 pyOpenSSL 降级到版本 19,现在 proton 运行良好。

这也导致其他应用程序无法启动,例如软件和更新 livepatch、ubuntu 软件中心等,此外,运行 pip 也会引发同样的错误,我已使用 apt 包管理器使用命令安装了 pip,

sudo apt install python3-pip

pip 将无法工作。

最后,我删除了该软件包并通过以下方式安装它:

$ curl -sSL https://bootstrap.pypa.io/get-pip.py -o get-pip.py
$ python get-pip.py

并且这次安装很好,因为之后 pip 工作正常,我能够轻松地管理包。

相关内容