Skip to content

Table challenge missing #22

@noraj

Description

@noraj

I'm not in production (didn't put PRODUCTION=1) so the app must use dev.db SQLite databse.

But peewee found that there is no such table: challenge.

$ ./ctftool challenges add problem.yml
Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/peewee.py", line 3768, in execute_sql
    cursor.execute(sql, params or ())
sqlite3.OperationalError: no such table: challenge

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "./ctftool", line 248, in <module>
    main()
  File "./ctftool", line 244, in main
    args.func(args)
  File "./ctftool", line 140, in add_challenge
    chal = Challenge.create(**yaml.load(f))
  File "/usr/lib/python3.6/site-packages/peewee.py", line 4915, in create
    inst.save(force_insert=True)
  File "/usr/lib/python3.6/site-packages/peewee.py", line 5108, in save
    pk_from_cursor = self.insert(**field_dict).execute()
  File "/usr/lib/python3.6/site-packages/peewee.py", line 3526, in execute
    cursor = self._execute()
  File "/usr/lib/python3.6/site-packages/peewee.py", line 2912, in _execute
    return self.database.execute_sql(sql, params, self.require_commit)
  File "/usr/lib/python3.6/site-packages/peewee.py", line 3775, in execute_sql
    self.commit()
  File "/usr/lib/python3.6/site-packages/peewee.py", line 3598, in __exit__
    reraise(new_type, new_type(*exc_args), traceback)
  File "/usr/lib/python3.6/site-packages/peewee.py", line 135, in reraise
    raise value.with_traceback(tb)
  File "/usr/lib/python3.6/site-packages/peewee.py", line 3768, in execute_sql
    cursor.execute(sql, params or ())
peewee.OperationalError: no such table: challenge

Am I missing something?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions