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

Launch fails with Python 3.10, Fix strict parameters for gui.move #599

Closed
wants to merge 1 commit into from
Closed

Conversation

EkriirkE
Copy link

@EkriirkE EkriirkE commented Sep 3, 2021

Tor Browser Launcher
By Micah Lee, licensed under MIT
version 0.3.5
https://github.com/micahflee/torbrowser-launcher
Downloading Tor Browser for the first time.
Downloading https://aus1.torproject.org/torbrowser/update_3/release/Linux_x86_64-gcc3/x/en-US
Traceback (most recent call last):
  File "/usr/bin/torbrowser-launcher", line 30, in <module>
    torbrowser_launcher.main()
  File "/usr/lib/python3.10/site-packages/torbrowser_launcher/__init__.py", line 92, in main
    gui.move(
TypeError: arguments did not match any overloaded call:
  move(self, QPoint): argument 1 has unexpected type 'float'
  move(self, int, int): argument 1 has unexpected type 'float'

Adding int() wrappers around the parameters in question fixed it.

@@ -90,8 +90,8 @@ def main():
desktop = app.desktop()
window_size = gui.size()
gui.move(
(desktop.width() - window_size.width()) / 2,
(desktop.height() - window_size.height()) / 2,
int((desktop.width() - window_size.width()) / 2),
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You may want to do // 2 instead of casting float to int.

@miquelmassot
Copy link

This PR solves #628

@Lvl4Sword
Copy link

Lvl4Sword commented Apr 26, 2022

I'm not seeing the same thing @miquelmassot is. Doing the // 2 fix allows the launcher to run. Though, it doesn't seem to do a whole lot. torbrowser-launcher within a terminal gives the following:

Tor Browser Launcher
By Micah Lee, licensed under MIT
version 0.3.3
https://github.com/micahflee/torbrowser-launcher
Warning: Ignoring XDG_SESSION_TYPE=wayland on Gnome. Use QT_QPA_PLATFORM=wayland to run on Wayland anyway.
Downloading Tor Browser for the first time.
Downloading https://aus1.torproject.org/torbrowser/update_3/release/Linux_x86_64-gcc3/x/en-US

and then a Downloading Tor Browser for the first time. box comes up with the title Tor Browser and it just stays at Downloading version check, 0%.

This is on Ubuntu 22.04 LTS.

@teward
Copy link
Contributor

teward commented Jun 22, 2022

This remains an issue - please review this PR to see if this solves the problem.

@niccokunzmann
Copy link

I created #644. It solves it for me. This PR would, too.

Though, it doesn't seem to do a whole lot. torbrowser-launcher within a terminal gives the following:

It does it. It is another issue that should be adressed in another PR.

@niccokunzmann
Copy link

niccokunzmann commented Jul 5, 2022

Please merge #642 to fix this.

@lazytownfan
Copy link

This bug fix from Ubuntu's packaging is likely to resolve this in at least 1 week before this is acted upon here.

@nikolas
Copy link

nikolas commented Sep 7, 2022

@micahflee can you take a look and merge this?

@micahflee
Copy link
Collaborator

Fixed in 8c69da1

@micahflee micahflee closed this Dec 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
9 participants