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

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

Open
Scherflinge opened this issue May 27, 2020 · 3 comments

Comments

@Scherflinge
Copy link

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
Copy link

dianaxun commented Jun 2, 2020

@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
Copy link

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

@ujagrati
Copy link

ujagrati commented Jul 3, 2024

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

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

4 participants