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

Tribler does not start - "TypeError: arguments did not match any overloaded call: QPoint(): too many arguments" #6688

Closed
G-P-L opened this issue Dec 26, 2021 · 8 comments

Comments

@G-P-L
Copy link

G-P-L commented Dec 26, 2021

I am an Arch Linux user and did not use Tribler for some week and after that the app won't start with the following error in the log:

[PID:70515] 2021-12-26 17:45:42,157 - INFO - TriblerApplication(23) - Start Tribler application. Win id: "triblerapp". Sys argv: "['/opt/Tribler/run_tribler.py']"
[PID:70515] 2021-12-26 17:45:42,349 - INFO - TriblerApplication(51) - No running instances (socket error: 2)
[PID:70515] 2021-12-26 17:45:42,538 - INFO - tribler_gui(454) - Available Tribler translations {'Russian': 'ru_RU', 'Portuguese': 'pt_BR', 'Chinese': 'zh_CN', 'English': 'en_US'}
[PID:70515] 2021-12-26 17:45:42,539 - INFO - tribler_gui(455) - System language: ['hu-HU'], Tribler language: ['hu', 'hu-HU', 'hu-Latn-HU']
[PID:70515] 2021-12-26 17:45:42,539 - INFO - __main__(208) - Start Tribler Window
[PID:70515] 2021-12-26 17:45:42,572 - INFO - NetworkUtils(30) - Looking for first free port in range [52194..52294]
[PID:70515] 2021-12-26 17:45:42,572 - INFO - NetworkUtils(34) - 52194 is free
[PID:70515] 2021-12-26 17:45:43,984 - INFO - TriblerGUI(147) - Will connect to events endpoint
[PID:70515] 2021-12-26 17:45:43,989 - ERROR <error_handler:37> ErrorHandler.gui_error(): Traceback (most recent call last):
  File "/opt/Tribler/run_tribler.py", line 209, in <module>
    window = TriblerWindow(settings)
  File "/opt/Tribler/tribler-gui/tribler_gui/tribler_window.py", line 275, in __init__
    pos = self.gui_settings.value("pos", QPoint(center.x() - self.width() * 0.5, center.y() - self.height() * 0.5))
TypeError: arguments did not match any overloaded call:
  QPoint(): too many arguments
  QPoint(int, int): argument 1 has unexpected type 'float'
  QPoint(QPoint): argument 1 has unexpected type 'float'

[PID:70515] 2021-12-26 17:45:43,991 - INFO - SentryReporter(286) - Event from exception: arguments did not match any overloaded call:
  QPoint(): too many arguments
  QPoint(int, int): argument 1 has unexpected type 'float'
  QPoint(QPoint): argument 1 has unexpected type 'float'
[PID:70515] 2021-12-26 17:45:44,002 - INFO - SentryReporter(358) - Before send strategy: SentryStrategy.SEND_SUPPRESSED
Sentry is attempting to send 1 pending error messages

I am the Tribler package maintainer for the Arch Linux/AUR and at least one other user also reported the exact same issue with the same error message, so I thought this is an Arch-specific problem. I thought one of the Qt or Python update is the cause of this behavior, but I could not triangulate which one. I tried to downgrade several suspicious package which was upgraded in the meantime to pinpoint the issue, but no luck.
Beside version 7.10 I also tried 7.11-RC2, but it has the same issue.
I am pleased to provide more information If necessary to solve this problem.

@ichorid
Copy link
Contributor

ichorid commented Dec 26, 2021

Thanks for reporting! This seems to be a residue (pun intended) of Python 2 to 3 migration. We'll try to fix that in 7.11

@ichorid
Copy link
Contributor

ichorid commented Dec 26, 2021

Could you please try this branch? #6687

@G-P-L
Copy link
Author

G-P-L commented Dec 27, 2021

The original error gone, but still crashes at start, but with a different error message:

tribler_gui.utilities.CreationTraceback: 
  File "/mnt/Adat/Ideiglenes/tribler/src/run_tribler.py", line 128, in <module>
    sys.exit(app.exec_())
  File "/mnt/Adat/Ideiglenes/tribler/src/tribler-gui/tribler_gui/utilities.py", line 372, in trackback_wrapper
    callback(*args, **kwargs)
  File "/mnt/Adat/Ideiglenes/tribler/src/tribler-gui/tribler_gui/core_manager.py", line 102, in on_request_error
    self.start_tribler_core(core_args=core_args, core_env=core_env)
  File "/mnt/Adat/Ideiglenes/tribler/src/tribler-gui/tribler_gui/core_manager.py", line 182, in start_tribler_core
    connect(self.core_process.finished, self.on_core_finished)

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/mnt/Adat/Ideiglenes/tribler/src/tribler-gui/tribler_gui/utilities.py", line 375, in trackback_wrapper
    raise exc from CreationTraceback(traceback_str)
  File "/mnt/Adat/Ideiglenes/tribler/src/tribler-gui/tribler_gui/utilities.py", line 372, in trackback_wrapper
    callback(*args, **kwargs)
  File "/mnt/Adat/Ideiglenes/tribler/src/tribler-gui/tribler_gui/core_manager.py", line 92, in on_core_finished
    raise CoreCrashedError(exception_msg)
tribler_gui.exceptions.CoreCrashedError: The Tribler core has unexpectedly finished with exit code 1 and status: 0!

Traceback (most recent call last):
  File "/mnt/Adat/Ideiglenes/tribler/src/run_tribler.py", line 68, in <module>

(Timestamp: 1640606741727, traceback timestamp: 1640606741547)
Traceback (most recent call last):
  File "/mnt/Adat/Ideiglenes/tribler/src/run_tribler.py", line 68, in <module>

@ichorid
Copy link
Contributor

ichorid commented Dec 27, 2021

In the current version, we can't see what happened at the Core console - the crash happens too soon, before the Sentry init. Could you please run Core standalone like this: env CORE_PROCESS=1 src/tribler.sh and post the console output here?

@G-P-L
Copy link
Author

G-P-L commented Dec 27, 2021

Of course, this is what I got:

$ env CORE_PROCESS=1 src/tribler.sh
INFO:__main__:Sentry has been initialised in normal mode
INFO:__main__:Root state dir: /home/gudmannpeter/.Tribler
INFO:__main__:Running in "core" mode
Traceback (most recent call last):
  File "/mnt/Adat/Ideiglenes/tribler/src/run_tribler.py", line 63, in <module>
    base_path = os.environ['CORE_BASE_PATH']
  File "/usr/lib/python3.10/os.py", line 679, in __getitem__
    raise KeyError(key) from None
KeyError: 'CORE_BASE_PATH'

@ichorid
Copy link
Contributor

ichorid commented Dec 27, 2021

Well, sir, Python 3.10 is officially not supported by Tribler yet. There are many reasons for that, PonyORM incompatibility in particular 🤷

@ichorid
Copy link
Contributor

ichorid commented Dec 27, 2021

And try running it like this: env CORE_PROCESS=1 CORE_BASE_PATH=./src/tribler-core/tribler_core CORE_API_PORT=1234 src/tribler.sh (in the toplevel repository dir) just in case...

@G-P-L
Copy link
Author

G-P-L commented Dec 27, 2021

Mistery solved. :) Then I will retest your solution with Python 3.9 in a conda environment. The rolling release nature of Arch sometimes causes issues like this.

@ichorid ichorid closed this as completed Dec 27, 2021
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