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

TypeError: setMinimumWidth(self, int) argument 1 has unexpected type 'float' #198

Closed
AWHubGit opened this issue Sep 20, 2021 · 4 comments
Closed
Labels
bug Something isn't working done

Comments

@AWHubGit
Copy link

AWHubGit commented Sep 20, 2021

I am trying to install "bauh" in Fedora 35 prerelease running as VM in virtenv "Boxes" in a ArchLinux.
python3-pyqt5-sip-12.9.0-2.fc35.x86_64 has been manually installed by "sudo dnf install python3-pyqt5-sip".

Using "pip install bauh" leads to a "TypeError: setMinimumWidth(self, int) argument 1 has unexpected type 'float'" when trying to start bauh on cli.
pip uninstall bauh
Building/installing bauh according to:
git clone https://github.com/vinifmor/bauh.git -b staging --depth=1
cd bauh
python3 -m venv venv
venv/bin/pip install pip --upgrade
venv/bin/pip install setuptools --upgrade
venv/bin/pip install -r requirements.txt
venv/bin/pip install .
venv/bin/bauh # or venv/bin/bauh-tray

is not possible.

venv/bin/pip install -r requirements.txt throws error:

ERROR: Failed building wheel for PyQt5-sip
Failed to build PyQt5-sip
ERROR: Could not build wheels for PyQt5-sip which use PEP 517 and cannot be installed directly

How to install now bauh?

@vinifmor
Copy link
Owner

I'm going to try installing on Fedora and let you know. It should be a missing package.

@manuGe
Copy link

manuGe commented Nov 15, 2021

Are there any updates? I'm running Fedora 35 and can't run bauh anymore.
Installing bauh with pip install bauh works flawlessly but when I try to start the application from the terminal, I'm getting the following error message:

Traceback (most recent call last):
  File "/home/manuel/.local/bin//bauh", line 8, in <module>
    sys.exit(main())
  File "/home/manuel/.local/lib/python3.10/site-packages/bauh/app.py", line 51, in main
    app, widget = new_manage_panel(args, app_config, logger)
  File "/home/manuel/.local/lib/python3.10/site-packages/bauh/manage.py", line 70, in new_manage_panel
    prepare = PreparePanel(screen_size=app.primaryScreen().size(),
  File "/home/manuel/.local/lib/python3.10/site-packages/bauh/view/qt/prepare.py", line 156, in __init__
    self.setMinimumWidth(screen_size.width() * 0.5)
TypeError: setMinimumWidth(self, int): argument 1 has unexpected type 'float'

@vinifmor
Copy link
Owner

That's weird. It seems the QT libraries for Fedora are no casting float to integers. Anyway, I've pushed a hard casting for the QT component sizes to avoid this sort of issue b50b067 on the staging branch. Could you give me a feedback if it is not crashing anymore ?

@vinifmor vinifmor added bug Something isn't working waiting feedback staging and removed in review labels Nov 17, 2021
@manuGe
Copy link

manuGe commented Nov 18, 2021

Works perfectly now. Thanks for the quick fix!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working done
Projects
None yet
Development

No branches or pull requests

3 participants