itspoma / audio-fingerprint-identifying-python

The Shazam-similar app, that identify the song using audio fingerprints & spectrum analysis and Fast Fourier transform
MIT License
351 stars 164 forks source link

error running make fingerprint-songs command #13

Open DrXploiter opened 4 years ago

DrXploiter commented 4 years ago

Hi i keep trying to run the 'make fingerprint-songs' command but keep getting this error.

root@programmer-virtual-machine:~/Desktop/audio-fingerprint-identifying-python# make fingerprint-songs sqlite - connection opened Traceback (most recent call last): File "collect-fingerprints-of-songs.py", line 25, in <module> song = db.get_song_by_filehash(audio['file_hash']) File "/home/programmer/Desktop/audio-fingerprint-identifying-python/libs/db.py", line 15, in get_song_by_filehash "filehash": filehash File "/home/programmer/Desktop/audio-fingerprint-identifying-python/libs/db_sqlite.py", line 61, in findOne return self.executeOne(select['query'], select['values']) File "/home/programmer/Desktop/audio-fingerprint-identifying-python/libs/db_sqlite.py", line 34, in executeOne self.cur.execute(query, values) sqlite3.OperationalError: no such table: songs sqlite - connection has been closed Makefile:19: recipe for target 'fingerprint-songs' failed make: *** [fingerprint-songs] Error 1 root@programmer-:~/Desktop/audio-fingerprint-identifying-python#

executable16 commented 4 years ago

@DrXploiter What python version are you using. This works fine with python 2.7. I tried to convert these code version from Python 2.7 to Python 3.6 but it shows some errors, specifically in the hashing part. Try running from a virtual environment with version 2.7

ZhymabekRoman commented 4 years ago

Hi!

make clean reset
Mr-Ruben commented 3 years ago

I found that doing

# Clone project
git clone https://github.com/itspoma/audio-fingerprint-identifying-python.git

#  you will need to restore/create the database for first time running the following command
make clean reset

# 4. Generate MP3 files fingerprints
python2 collect-fingerprints-of-songs.py

It fails in the same way with:

sqlite - connection opened
Traceback (most recent call last):
  File "collect-fingerprints-of-songs.py", line 25, in <module>
    song = db.get_song_by_filehash(audio['file_hash'])
  File "/content/audio-fingerprint-identifying-python/libs/db.py", line 15, in get_song_by_filehash
    "filehash": filehash
  File "/content/audio-fingerprint-identifying-python/libs/db_sqlite.py", line 61, in findOne
    return self.executeOne(select['query'], select['values'])
  File "/content/audio-fingerprint-identifying-python/libs/db_sqlite.py", line 34, in executeOne
    self.cur.execute(query, values)
sqlite3.OperationalError: no such table: songs
sqlite - connection has been closed

But if you run again

make clean reset
python2 collect-fingerprints-of-songs.py

It works this time.