oTree Forum >

Error with db.sqlite3 file

#1 by Tamer

Every time I rerun with "otree devserver" I get this error:

sqlite3.OperationalError: near "-": syntax error

Then I have to delete db.sqlite3 before it works again only once.
After that I get the same error again when running "otree devserver" until I delete db.sqlite3 again.

*******
error message:

(venv) project_dir>otree devserver
Traceback (most recent call last):
  File "user\AppData\Local\Programs\Python\Python39\lib\runpy.py", line 197, in _run_module_as_main
    return _run_code(code, main_globals, None,
execute_from_command_line
execute_from_command_line
    setup()
  File "project_dir\venv\lib\site-packages\otree\main.py", line 142, in setup
    init_orm()
  File "project_dir\venv\lib\site-packages\otree\database.py", line 331, in init_orm
    load_in_memory_db()
  File "project_dir\venv\lib\site-packages\otree\database.py", line 115, in load_in_memory_db
    disk_cur.execute(select_cmd)
sqlite3.OperationalError: near "-": syntax error

#2 by Chris_oTree

Can you send me the db.sqlite3 file?

#3 by Tamer

emailed to chris@otree.org

#4 by Tamer

Solution [as suggested by Chris]:
The issue was that an app had a hyphen in its name. Removing the hyphen and deleting the database solved the issue.

Write a reply

Set forum username