Skip to content

Writing deck to file raises an exception. #5

Description

@carllacan

I get an error whenever I try to write a deck to file. It happens also with the example in the documentation, so it shouldn't be caused by the deck I am trying to create.

This is the output I get:

>>> Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/carles/Desktop/kindletoanki/test.py", line 30, in <module>
    genanki.Package(my_deck).write_to_file('output.apkg')
  File "/home/carles/.local/lib/python2.7/site-packages/genanki-0.2.1-py2.7.egg/genanki/__init__.py", line 289, in write_to_file
    self.write_to_db(cursor, now_ts)
  File "/home/carles/.local/lib/python2.7/site-packages/genanki-0.2.1-py2.7.egg/genanki/__init__.py", line 302, in write_to_db
    deck.write_to_db(cursor, now_ts)
  File "/home/carles/.local/lib/python2.7/site-packages/genanki-0.2.1-py2.7.egg/genanki/__init__.py", line 271, in write_to_db
    note.write_to_db(cursor, now_ts, self.deck_id)
  File "/home/carles/.local/lib/python2.7/site-packages/genanki-0.2.1-py2.7.egg/genanki/__init__.py", line 232, in write_to_db
    '',                           # data
sqlite3.IntegrityError: NOT NULL constraint failed: notes.guid

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions