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: setRange(self, minimum: int, maximum: int): argument 2 has unexpected type 'float' #113

Open
arobertson404 opened this issue Jul 2, 2024 · 0 comments

Comments

@arobertson404
Copy link

Fedora 40, Python 3.12

I encountered a TypeError when trying to run QSpectrumAnalyzer with Python 3.12. The error was due to setRange expecting integer arguments, but receiving a float instead.

To fix:
edit qspectrumanalyzer-master/qspectrumanalyzer/main.py

-self.progressbar.setRange(0, self.intervalSpinBox.value() * 1000)
+self.progressbar.setRange(0, int(self.intervalSpinBox.value() * 1000))

-self.progressbar.setRange(0, value_max)
+self.progressbar.setRange(0, int(value_max))

-self.progressbar.setValue(value)
+self.progressbar.setValue(int(value))


There is a further issue with QtGui not being imported, to fix:
edit qspectrumanalyzer-master/qspectrumanalyzer/plot.py

-from Qt import QtCore
+from Qt import QtCore, QtGui


Make sure you have all the dependencies installed:
sudo dnf install python3-SoapySDR soapy-rtlsdr qqc2-desktop-style python3-pyqt6-sip

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

No branches or pull requests

1 participant