audio-fingerprint-identifying-python icon indicating copy to clipboard operation
audio-fingerprint-identifying-python copied to clipboard

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

Open Scherflinge opened this issue 5 years ago • 3 comments

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.

Scherflinge avatar May 27 '20 23:05 Scherflinge

@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.

dianaxun avatar Jun 02 '20 06:06 dianaxun

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

Rahul-8055 avatar Sep 30 '22 14:09 Rahul-8055

i am running this on Linux with pYthon 2.7 still not working make clean reset command with the suggestion also incorporated by @dianaxun please help asap

ujagrati avatar Jul 03 '24 14:07 ujagrati