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

Make issue, "cannot import name 'Database' from 'db' (unknown location)" #19

Open Scherflinge opened 4 years ago

Scherflinge commented 4 years ago

I'm following the set-up instructions. I try make clean reset and get this error.

Traceback (most recent call last):
  File "reset-database.py", line 2, in <module>
    from libs.db_sqlite import SqliteDatabase
  File "/eric/Desktop/Audio fingerprint/audio-fingerprint-identifying-python-master/libs/db_sqlite.py", line 1, in <module>
    from db import Database
ImportError: cannot import name 'Database' from 'db' (unknown location)
make: *** [Makefile:10: reset] Error 1

I assume I'm doing something in the wrong order, but db is an empty folder. Just unsure what I'm missing.

dianaxun commented 4 years ago

@Scherflinge first of all,it runs in python2(i find out laterly).this is because db directory and db.py under libs share same name,when execute from db import Database,it find Database in the db directory,a error raised.tryfrom libs.db import Database from libs.config import get_config.

Rahul-8055 commented 1 year ago

Does it only work with python2 ? Even I am also getting same error as above