[Solved]-No such table error when running a django server from Eclipse

11👍

Probably Eclipse/PyDev is not able to find the database. Assuming that you use a sqlite3 database, use a full path in the DATABASES settings. Test it via the console and afterwards within Eclipse. That should work 😉

edit:
As photioionized suggested, the best approach is to put those lines in settings.py

import os
PROJECT_PATH = os.path.dirname(os.path.abspath(__file__))

and then to

SQLITE_3 = os.path.join(PROJECT_PATH, 'YOUR DATABASE.DB')

SQLITE_3 is now the full path to your sqlite3 database, whereever your django project lives.

👤jazz

0👍

For windows eclipse, It should be full path

for e.g. C:\\Abc.db

'\\' should come in place of single slash.

👤Nilesh

Leave a comment