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

NOT NULL constraint failed: col.tags when reexporting a deck without changes #11

Open
chayleaf opened this issue May 3, 2022 · 1 comment

Comments

@chayleaf
Copy link

chayleaf commented May 3, 2022

The deck was created with Yomichan, and was exported from Anki. I will add an example db in a bit to make this easily reproducible.

Traceback (most recent call last):
  File "/usr/lib/python3.10/site-packages/peewee.py", line 3177, in execute_sql
    cursor.execute(sql, params or ())
sqlite3.IntegrityError: NOT NULL constraint failed: col.tags

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "...", in <module>
    apkg.export('out.apkg')
  File "/home/user/.local/lib/python3.10/site-packages/ankisync2/apkg.py", line 82, in export
    Anki20(self.orignal_anki2).finalize()
  File "/home/user/.local/lib/python3.10/site-packages/ankisync2/anki20/__init__.py", line 111, in finalize
    c.save()
  File "/usr/lib/python3.10/site-packages/playhouse/signals.py", line 71, in save
    ret = super(Model, self).save(*args, **kwargs)
  File "/usr/lib/python3.10/site-packages/peewee.py", line 6638, in save
    rows = self.update(**field_dict).where(self._pk_expr()).execute()
  File "/usr/lib/python3.10/site-packages/peewee.py", line 1918, in inner
    return method(self, database, *args, **kwargs)
  File "/usr/lib/python3.10/site-packages/peewee.py", line 1989, in execute
    return self._execute(database)
  File "/usr/lib/python3.10/site-packages/peewee.py", line 2496, in _execute
    cursor = database.execute(self)
  File "/usr/lib/python3.10/site-packages/peewee.py", line 3190, in execute
    return self.execute_sql(sql, params, commit=commit)
  File "/usr/lib/python3.10/site-packages/peewee.py", line 3174, in execute_sql
    with __exception_wrapper__:
  File "/usr/lib/python3.10/site-packages/peewee.py", line 2950, in __exit__
    reraise(new_type, new_type(exc_value, *exc_args), traceback)
  File "/usr/lib/python3.10/site-packages/peewee.py", line 191, in reraise
    raise value.with_traceback(tb)
  File "/usr/lib/python3.10/site-packages/peewee.py", line 3177, in execute_sql
    cursor.execute(sql, params or ())
peewee.IntegrityError: NOT NULL constraint failed: col.tags
@Mike7154
Copy link

I have the same issue, have you found a fix yet?

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