SQL Logic Error

Hey guys,

I just installed Stagsi and I’ve been getting this error when trying to create a new Database, any idea what is causing this issue?

SQL logic error
no such table: Stags
   at System.Data.SQLite.SQLite3.Prepare(SQLiteConnection cnn, String strSql, SQLiteStatement previous, UInt32 timeoutMS, String& strRemain)
   at System.Data.SQLite.SQLiteCommand.BuildNextCommand()
   at System.Data.SQLite.SQLiteCommand.GetStatement(Int32 index)
   at System.Data.SQLite.SQLiteDataReader.NextResult()
   at System.Data.SQLite.SQLiteDataReader..ctor(SQLiteCommand cmd, CommandBehavior behave)
   at System.Data.SQLite.SQLiteCommand.ExecuteReader(CommandBehavior behavior)
   at System.Data.SQLite.SQLiteCommand.ExecuteDbDataReader(CommandBehavior behavior)
   at System.Data.Common.DbCommand.ExecuteDbDataReaderAsync(CommandBehavior behavior, CancellationToken cancellationToken)
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)
   at Soletude.Stags.Library.Model.StagsDbContext`1.#xc.#Gb()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Soletude.Stags.Library.Model.StagsDbContext`1.#wc.#Gb()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Soletude.Stags.Images.Startup.<>c.#Gm.#Gb()

The error says the Stagsi.sqlite file in your database folder (%appdata%\Soletude\Stagsi by default) has wrong structure. Haven’t seen this before, not sure what could have caused this.

Try creating a new database via the main menu (File), it’ll ask for an empty folder - create one or choose an existing, then see if Stagsi opens fine. If not, go to that folder in Explorer and check what it contains and let me know. If yes, then close Stagsi and delete the default database folder (in %appdata%) and run Stagsi again so it can recreate it.

Hope it helps.