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

[7.14.0] ValueError: invalid literal for int() with base 10 (in DownloadManager.set_proxy_settings) #8014

Closed
kozlovsky opened this issue Apr 29, 2024 · 1 comment · Fixed by #8033
Assignees
Milestone

Comments

@kozlovsky
Copy link
Collaborator

Traceback (most recent call last):, 
  File "tribler/core/components/component.py", line 42, in start, 
  File "tribler/core/components/libtorrent/libtorrent_component.py", line 31, in run, 
  File "tribler/core/components/libtorrent/download_manager/download_manager.py", line 150, in initialize, 
  File "tribler/core/components/libtorrent/download_manager/download_manager.py", line 340, in get_session, 
  File "tribler/core/components/libtorrent/download_manager/download_manager.py", line 296, in create_session, 
  File "tribler/core/components/libtorrent/download_manager/download_manager.py", line 354, in set_proxy_settings, 
ValueError: invalid literal for int() with base 10: '//rutorrent.frixa.appboxes.co'

Here:

    def set_proxy_settings(self, ltsession, ptype, server=None, auth=None):
        """
        Apply the proxy settings to a libtorrent session. This mechanism changed significantly in libtorrent 1.1.0.
        """
        settings = {}
        settings["proxy_type"] = ptype
        settings["proxy_hostnames"] = True
        settings["proxy_peer_connections"] = True
        if server and server[0] and server[1]:
            settings["proxy_hostname"] = server[0]
            settings["proxy_port"] = int(server[1])  # <-- here

It looks like the user specified an incorrect value for the LibtorrentSettings.proxy_server config option.

The error does not look serious, but instead of a generic ValueError, it is better to raise a specific error that describes the problem to the user so he can fix the configuration settings.

Copy link

Sentry issue: TRIBLER-1PH

@drew2a drew2a self-assigned this May 22, 2024
@drew2a drew2a added this to the 7.15.0 milestone May 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants