Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Codex 1.2.0 fails with fresh config #240

Closed
beville opened this issue Feb 22, 2023 · 3 comments
Closed

Codex 1.2.0 fails with fresh config #240

beville opened this issue Feb 22, 2023 · 3 comments

Comments

@beville
Copy link

beville commented Feb 22, 2023

Codex is running fine with an existing config folder and DB, but when I if I try to create a new one, I get the following.

Hopefully I'm forgetting something?

$ /opt/codex/venv/bin/codex
Copied default config to /opt/codex/config_test_lib/hypercorn.toml
2023-02-21 16:02:02 PST DEBUG   Loaded json choices from /opt/codex/venv/lib/python3.10/site-packages/codex/static_root/js choices
2023-02-21 16:02:02 PST DEBUG   Parsed browser choices
2023-02-21 16:02:02 PST DEBUG   Parsed reader choices
2023-02-21 16:02:02 PST DEBUG   Parsed websockets choices
2023-02-21 16:02:02 PST DEBUG   Loaded json choices from /opt/codex/venv/lib/python3.10/site-packages/codex/static_root/js choices-admin
2023-02-21 16:02:02 PST DEBUG   sqlite journal_mode=wal
2023-02-21 16:02:02 PST INFO    Running Codex v1.2.0
2023-02-21 16:02:02 PST DEBUG   Ensuring db is good and up to date...
Traceback (most recent call last):
  File "/opt/codex/venv/lib/python3.10/site-packages/django/db/backends/utils.py", line 89, in _execute
    return self.cursor.execute(sql, params)
  File "/opt/codex/venv/lib/python3.10/site-packages/django/db/backends/sqlite3/base.py", line 357, in execute
    return Database.Cursor.execute(self, query, params)
sqlite3.OperationalError: no such table: auth_user

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/opt/codex/venv/bin/codex", line 8, in <module>
2023-02-21 16:02:02 PST INFO    Not running integrity checks until migration 0005_auto_20200918_0146 has been applied.
    sys.exit(main())
  File "/opt/codex/venv/lib/python3.10/site-packages/codex/run.py", line 51, in main
    codex_init()
  File "/opt/codex/venv/lib/python3.10/site-packages/codex/startup.py", line 128, in codex_init
2023-02-21 16:02:02 PST WARNING no such table: django_migrations
    ensure_db_rows()
  File "/opt/codex/venv/lib/python3.10/site-packages/codex/startup.py", line 118, in ensure_db_rows
2023-02-21 16:02:02 PST INFO    Database up to date.
    ensure_superuser()
  File "/opt/codex/venv/lib/python3.10/site-packages/codex/startup.py", line 51, in ensure_superuser
    if RESET_ADMIN or not User.objects.filter(is_superuser=True).exists():
  File "/opt/codex/venv/lib/python3.10/site-packages/django/db/models/query.py", line 1225, in exists
2023-02-21 16:02:02 PST INFO    Database ready.
    return self.query.has_results(using=self.db)
  File "/opt/codex/venv/lib/python3.10/site-packages/django/db/models/sql/query.py", line 592, in has_results
    return compiler.has_results()
  File "/opt/codex/venv/lib/python3.10/site-packages/django/db/models/sql/compiler.py", line 1363, in has_results
    return bool(self.execute_sql(SINGLE))
  File "/opt/codex/venv/lib/python3.10/site-packages/django/db/models/sql/compiler.py", line 1395, in execute_sql
    cursor.execute(sql, params)
  File "/opt/codex/venv/lib/python3.10/site-packages/django/db/backends/utils.py", line 67, in execute
    return self._execute_with_wrappers(
  File "/opt/codex/venv/lib/python3.10/site-packages/django/db/backends/utils.py", line 80, in _execute_with_wrappers
    return executor(sql, params, many, context)
  File "/opt/codex/venv/lib/python3.10/site-packages/django/db/backends/utils.py", line 84, in _execute
    with self.db.wrap_database_errors:
  File "/opt/codex/venv/lib/python3.10/site-packages/django/db/utils.py", line 91, in __exit__
    raise dj_exc_value.with_traceback(traceback) from exc_value
  File "/opt/codex/venv/lib/python3.10/site-packages/django/db/backends/utils.py", line 89, in _execute
    return self.cursor.execute(sql, params)
  File "/opt/codex/venv/lib/python3.10/site-packages/django/db/backends/sqlite3/base.py", line 357, in execute
    return Database.Cursor.execute(self, query, params)
django.db.utils.OperationalError: no such table: auth_user
Exception in thread Thread-1 (_monitor):
Traceback (most recent call last):
  File "/usr/lib/python3.10/threading.py", line 1016, in _bootstrap_inner
    self.run()
  File "/usr/lib/python3.10/threading.py", line 953, in run
    self._target(*self._args, **self._kwargs)
  File "/usr/lib/python3.10/logging/handlers.py", line 1543, in _monitor
    record = self.dequeue(True)
  File "/usr/lib/python3.10/logging/handlers.py", line 1492, in dequeue
    return self.queue.get(block)
  File "/usr/lib/python3.10/multiprocessing/queues.py", line 103, in get
    res = self._recv_bytes()
  File "/usr/lib/python3.10/multiprocessing/connection.py", line 216, in recv_bytes
    buf = self._recv_bytes(maxlength)
  File "/usr/lib/python3.10/multiprocessing/connection.py", line 414, in _recv_bytes
    buf = self._recv(4)
  File "/usr/lib/python3.10/multiprocessing/connection.py", line 383, in _recv
    raise EOFError
EOFError

@ajslater
Copy link
Owner

Reproduced. Fix incoming.

@ajslater
Copy link
Owner

Thank you very much for reporting this.
Should be fixed in v1.2.1 just deployed.

@beville
Copy link
Author

beville commented Feb 22, 2023

Thank you! I was just starting another round of experiments with OPDS and will have another batch of reports for ya.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants