Fingerprinting fails because `numpy boolean subtract` deprecated
I'm trying to use dejavu for the first time (just djv.fingerprint_directory(audio_path, [".mp3"], 3)), and it seems to fail on all files. I see output like this:
$ python dejavu-scan.py
~/venvs/dejavu/lib/python2.7/site-packages/dejavu/database_sql.py:158: Warning: Table 'songs' already exists
cur.execute(self.CREATE_SONGS_TABLE)
~/venvs/dejavu/lib/python2.7/site-packages/dejavu/database_sql.py:159: Warning: Table 'fingerprints' already exists
cur.execute(self.CREATE_FINGERPRINTS_TABLE)
Fingerprinting channel 1/2 for ~/audio/file-1.mp3
~/venvs/dejavu/lib/python2.7/site-packages/dejavu/fingerprint.py:86: RuntimeWarning: divide by zero encountered in log10
arr2D = 10 * np.log10(arr2D)
Fingerprinting channel 1/2 for ~/audio/file-2.mp3
Fingerprinting channel 1/2 for ~/audio/file-3.mp3
Failed fingerprinting
Traceback (most recent call last):
File "~/venvs/dejavu/lib/python2.7/site-packages/dejavu/__init__.py", line 77, in fingerprint_directory
song_name, hashes, file_hash = iterator.next()
File "/usr/local/Cellar/python/2.7.13_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/multiprocessing/pool.py", line 668, in next
raise value
TypeError: numpy boolean subtract, the `-` operator, is deprecated, use the bitwise_xor, the `^` operator, or the logical_xor function instead.
The Failed fingerprinting and traceback repeat as long as I let the process go.
You should use numpy==1.13.3 to avoid this problem
That seems to have worked. Should requirements.txt be updated?
downgrade to 1.13.3, but I got another error: RuntimeError: module compiled against API version 0xc but this version of numpy is 0xb ImportError: numpy.core.multiarray failed to import
local_max = local_max.astype(np.float32)
eroded_background = eroded_background.astype(np.float32)
detected_peaks = local_max - eroded_background
detected_peaks = detected_peaks.astype(np.bool)
at fingerprint.py
maybe thats help
local_max = local_max.astype(np.float32) eroded_background = eroded_background.astype(np.float32) detected_peaks = local_max - eroded_background detected_peaks = detected_peaks.astype(np.bool)at
fingerprint.pymaybe thats help
really helpful, thanks a lot dude
local_max = local_max.astype(np.float32) eroded_background = eroded_background.astype(np.float32) detected_peaks = local_max - eroded_background detected_peaks = detected_peaks.astype(np.bool)at
fingerprint.pymaybe thats helpreally helpful, thanks a lot dude
but I got another error 'numpy.ndarray' object is not callable

at
fingerprint.pymaybe thats helpreally helpful, thanks a lot dude
but I got another error 'numpy.ndarray' object is not callable
Pretty sure you call the array (numpy version related)
change the arr2D(detected_peaks) with arr2D[detected_peaks]
or could you take a look to @DataWookie's fork? https://github.com/DataWookie/dejavu
You should use numpy==1.13.3 to avoid this problem
This will solve it, no error.
local_max = local_max.astype(np.float32) eroded_background = eroded_background.astype(np.float32) detected_peaks = local_max - eroded_background detected_peaks = detected_peaks.astype(np.bool)at
fingerprint.pymaybe thats help
Yes. That helped. Thanks a lot
You should use numpy==1.13.3 to avoid this problem
This will solve it, no error.
I tried this. But for some reason, I was unable to downgrade numpy. Winpython was throwing lot of errors