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.13.0] TypeError: 'NoneType' object is not subscriptable in StartDownloadDialog.__init__() #7641

Closed
kozlovsky opened this issue Oct 23, 2023 · 2 comments
Assignees
Milestone

Comments

@kozlovsky
Copy link
Contributor

kozlovsky commented Oct 23, 2023

tribler.gui.utilities.CreationTraceback:
  File "run_tribler.py", line 115, in <module>
  File "tribler\gui\start_gui.py", line 58, in run_gui
  File "tribler\gui\tribler_app.py", line 32, in __init__
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
  File "tribler\gui\utilities.py", line 438, in trackback_wrapper
  File "tribler\gui\utilities.py", line 435, in trackback_wrapper
  File "tribler\gui\tribler_app.py", line 36, in on_app_message
  File "tribler\gui\tribler_app.py", line 40, in handle_uri
  File "tribler\gui\tribler_window.py", line 1256, in handle_uri
  File "tribler\gui\tribler_window.py", line 639, in process_uri_request
  File "tribler\gui\tribler_window.py", line 866, in start_download_from_uri
  File "tribler\gui\dialogs\startdownloaddialog.py", line 100, in __init__
TypeError: 'NoneType' object is not subscriptable

Here:

        self.dialog_widget.anon_download_checkbox.setChecked(
            self.window().tribler_settings['download_defaults']['anonymity_enabled']

It looks like sometimes an option can be missed from the config.

@sentry-for-tribler
Copy link

Sentry issue: TRIBLER-1E2

@drew2a drew2a added this to the 7.13.1 milestone Oct 31, 2023
@drew2a drew2a self-assigned this Oct 31, 2023
@drew2a
Copy link
Contributor

drew2a commented Oct 31, 2023

I can not reproduce the bug but I have a hypnotise of how it could happened.

Consider the following sequence:

  1. Tribler starts the second instance of GUI and receives a URL from the first instance via the local socket (you can see it in logs)
  2. GUI handles the URL:
    def handle_uri(self, uri):
    self.pending_uri_requests.append(uri)
    if self.tribler_started and not self.start_download_dialog_active:
    self.process_uri_request()

But there is a chance that at this moment self.tribler_settings is still None as they have not been received yet. Therefore we see the TypeError: 'NoneType' object is not subscriptable as self.tribler_settings equals None.

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

No branches or pull requests

2 participants