vendredi 30 octobre 2015

Sqlite3 error when importing from upper directory

I have a couple of directories with *.py files. One of those directories contains database manager class. This class contains method for removing rows from Sqlite3 database which is situated in the same directory.

When I create a database manager class instance and call db_instance.remove_from_categories() (it removes all rows from table categories), everything works.

The problem is, when I create the instance of the same class in main.py which is in upper directory, it raises

    self.cur.execute('DELETE FROM categories')
sqlite3.OperationalError: no such table: categories

enter image description here

Do you know where is the problem?

Aucun commentaire:

Enregistrer un commentaire