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

Transformations_GUI issues on Python 3.11.1 (and 3.9.6) #140

Open
leximAI opened this issue Jan 25, 2023 · 1 comment
Open

Transformations_GUI issues on Python 3.11.1 (and 3.9.6) #140

leximAI opened this issue Jan 25, 2023 · 1 comment

Comments

@leximAI
Copy link

leximAI commented Jan 25, 2023

Clicking on Analysis results in the following error:

Exception in Tkinter callback
Traceback (most recent call last):
File "AppData\Local\Programs\Python\Python311\Lib\tkinter_init_.py", line 1948, in call
return self.func(*args)
^^^^^^^^^^^^^^^^
File "sms-tools\software\transformations_interface\sineTransformations_GUI_frame.py", line 180, in analysis
self.inputFile, self.fs, self.tfreq, self.tmag = sT.analysis(inputFile, window, M, N, t, minSineDur, maxnSines, freqDevOffset, freqDevSlope)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "\sms-tools\software\transformations_interface\sineTransformations_function.py", line 41, in analysis
tfreq, tmag, tphase = SM.sineModelAnal(x, fs, w, N, H, t, maxnSines, minSineDur, freqDevOffset, freqDevSlope)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "sms-tools\software\transformations_interface../models\sineModel.py", line 166, in sineModelAnal
tfreq, tmag, tphase = sineTracking(ipfreq, ipmag, ipphase, tfreq, freqDevOffset, freqDevSlope)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "sms-tools\software\transformations_interface../models\sineModel.py", line 25, in sineTracking
pindexes = np.array(np.nonzero(pfreq), dtype=np.int)[0] # indexes of current peaks
^^^^^^
File "AppData\Local\Programs\Python\Python311\Lib\site-packages\numpy_init_.py", line 284, in getattr
raise AttributeError("module {!r} has no attribute "
AttributeError: module 'numpy' has no attribute 'int'

@marcoslhc
Copy link

This happens because numpy removed support for np.float in version 1.24.
this PR is a workaround: #141

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

2 participants