Cannot download specific channel

I have a setup that is running on an ubuntu server with a postegres backend. I installed a number of channels and they worked wonderfully, except for one specific channel. I am having issues with Sikana (漢語 (臺灣)) which has the channel id 6583e111dac85239bb533f26fae6860d. I have tried both online and with Kolibri studio and through the command line, but it seems to error. When I do the command line it seems to have a problem:

INFO     2024-05-14 13:34:57,890 Running Kolibri with the following settings: kolibri.deployment.default.settings.base
INFO     2024-05-14 13:34:58,507 Importing 'tasks' module from django apps
INFO     2024-05-14 13:34:58,734 Invoking command importchannel network 6583e111dac85239bb533f26fae6860d
INFO     2024-05-14 13:34:59,457 Downloading data for channel id 6583e111dac85239bb533f26fae6860d
INFO     2024-05-14 13:35:03,376 Importing LocalFile data
INFO     2024-05-14 13:35:03,843 Importing Language data
INFO     2024-05-14 13:35:03,866 Importing ContentNode data
INFO     2024-05-14 13:35:15,924 Importing ChannelMetadata data
INFO     2024-05-14 13:35:15,951 Importing AssessmentMetaData data
INFO     2024-05-14 13:35:15,973 Importing File data
INFO     2024-05-14 13:35:16,742 Importing ContentNode_related data
INFO     2024-05-14 13:35:16,768 Importing ContentNode_has_prerequisite data
INFO     2024-05-14 13:35:16,789 Importing ContentTag data
INFO     2024-05-14 13:35:16,813 Importing ContentNode_tags data
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/kolibri/dist/sqlalchemy/engine/base.py", line 774, in _commit_impl
    self.engine.dialect.do_commit(self.connection)
  File "/usr/lib/python3/dist-packages/kolibri/dist/sqlalchemy/engine/default.py", line 543, in do_commit
    dbapi_connection.commit()
psycopg2.errors.ForeignKeyViolation: insert or update on table "content_file" violates foreign key constraint "content_file_local_file_id_9780c2ab_fk_content_localfile_id"
DETAIL:  Key (local_file_id)=(5493c1758566cdbf53295578f2a83540) is not present in table "content_localfile".

Also, I looked on the Kolibri Demo and it seems this channel is no longer available. Has it been pulled but for some reason is still listed on our version of Kolibri? 0.15.8.

It seems like the channel database for this channel has slightly malformed data - this is caused by the lack of referential integrity checks in SQLite in older versions of Django (when this channel was published) - Postgres, however, does do these referential integrity checks on import.

I think the fix here would require a republish of the channel with the missing file properly fixed. I’ll file this in our bug tracker, but it may take a bit of time to get to.

Ah, we had previously seen these issues: IntegrityError: The row in table 'content_file' with primary key 'c91d3060ca084219ac8eb8eca9d1389c' has an invali... · Issue #2 · learningequality/kolibri-library · GitHub - resolving this requires a bit of dedicated work on our side because of various uninteresting technical complexities. Is this strongly needed for your work? If so we can try to prioritize it a bit higher.

I would say this can wait. Most of what we’re doing these days would be in other languages.

Are we talking like months of a wait or what? I just want to communicate to my team expectations.

We first noticed this nearly a year ago, and unfortunately haven’t found room to action it since then - because it only affects Postgres instances specifically, for the majority of our users it hasn’t been an issue.

If getting it resolved within the next couple of months would work, I think we can make that happen.

That can work for us I believe.