Skip to content

SQL Lookup Tables will not initialize #70

Description

@sourlace

Hello! Having issues with the setup, it looks like the channel crawler is trying to reference a value from the un-initialized channels table?

The only channel that populates is 'users', the subsequent SQL insertions all fail due to the tables not being initialized correctly. Is there a setup step I missed?
Log:

[INFO] statbot.event: Initializing SQL lookup tables...
[INFO] statbot.event: Processing X users...
[INFO] statbot.event: Processing X guilds...
[INFO] statbot.event:
[INFO] statbot.event: Ready!
[INFO] statbot.sql: Looking up channel crawl progress for {server} #{channel}
[INFO] statbot.sql: Inserting new channel crawl progress for {server} #{channel}
[ERROR] statbot.sql: Exception occurred in 'with' scope!
Traceback (most recent call last):
File ".../python3.9/site-packages/sqlalchemy/engine/base.py", line 1819, in _execute_context
self.dialect.do_execute(
File ".../python3.9/site-packages/sqlalchemy/engine/default.py", line 732, in do_execute
cursor.execute(statement, parameters)
psycopg2.errors.ForeignKeyViolation: insert or update on table "channel_crawl" violates foreign key constraint "channel_crawl_channel_id_fkey"
DETAIL: Key (channel_id)=(1002...) is not present in table "channels".

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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