enex2notion: [Bug]:

enex2notion version

enex2notion 0.2.24

What OS are you using?

MacOS

OS Version / Linux distribution

Ventura 13.0.1

Bug description

Hello,

This seems to be related to #67 - meaning, it starts with the same 400 error, but with a different error thrown at the end:

requests.exceptions.HTTPError: Unsaved transactions: SpaceShardRecordPointer have no space id

Things I have tried:

  • reinstalled brew, enex (to check if any updated python packages)
  • converted all complex html --> to simple formatting
  • checked all 17 notes in this test notebook has no tables

Very grateful for any suggestions you might have. Thank you for creating enex2notion!

Log excerpt

INFO: 'Evernote ENEX Import' page found
INFO: Processing notebook 'startups'...
INFO: Uploading note 1 out of 17 '#AAA What Every Startup Needs to Know'
ERROR: Got 400 error attempting to POST to submitTransaction, with data: {
  "operations": [
    {
      "id": "573315a1-e65b-47d0-bb43-00a16388b356",
      "path": [],
      "args": {
        "id": "573315a1-e65b-47d0-bb43-00a16388b356",
        "version": 1,
        "alive": true,
        "created_by_id": "fe3731c3-b03e-4da0-8e0e-79b2ad01ec4c",
        "created_by_table": "notion_user",
        "created_time": 1670302128753,
        "parent_id": "4b5b3562-c2fe-4316-95f3-0a0e784e5860",
        "parent_table": "collection",
        "type": "page"
      },
      "command": "set",
      "table": "block"
    },
    {
      "args": {
        "last_edited_by_id": "fe3731c3-b03e-4da0-8e0e-79b2ad01ec4c",
        "last_edited_by_table": "notion_user",
        "last_edited_time": 1670302128753
      },
      "command": "update",
      "id": "573315a1-e65b-47d0-bb43-00a16388b356",
      "path": [],
      "table": "block"
    },
    {
      "args": {
        "last_edited_by_id": "fe3731c3-b03e-4da0-8e0e-79b2ad01ec4c",
        "last_edited_by_table": "notion_user",
        "last_edited_time": 1670302128753
      },
      "command": "update",
      "id": "573315a1-e65b-47d0-bb43-00a16388b356",
      "path": [],
      "table": "block"
    }
  ]
}
Traceback (most recent call last):
  File "/opt/homebrew/bin/enex2notion", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/opt/homebrew/Cellar/enex2notion/0.2.24/libexec/lib/python3.11/site-packages/enex2notion/cli.py", line 47, in main
    cli(sys.argv[1:])
  File "/opt/homebrew/Cellar/enex2notion/0.2.24/libexec/lib/python3.11/site-packages/enex2notion/cli.py", line 32, in cli
    _process_input(enex_uploader, args.enex_input)
  File "/opt/homebrew/Cellar/enex2notion/0.2.24/libexec/lib/python3.11/site-packages/enex2notion/cli.py", line 42, in _process_input
    enex_uploader.upload_notebook(path)
  File "/opt/homebrew/Cellar/enex2notion/0.2.24/libexec/lib/python3.11/site-packages/enex2notion/cli_upload.py", line 56, in upload_notebook
    self.upload_note(note, note_idx)
  File "/opt/homebrew/Cellar/enex2notion/0.2.24/libexec/lib/python3.11/site-packages/enex2notion/cli_upload.py", line 79, in upload_note
    _upload_note(self.notebook_root, note, note_blocks)
  File "/opt/homebrew/Cellar/enex2notion/0.2.24/libexec/lib/python3.11/site-packages/enex2notion/cli_upload.py", line 103, in _upload_note
    upload_note(notebook_root, note, note_blocks)
  File "/opt/homebrew/Cellar/enex2notion/0.2.24/libexec/lib/python3.11/site-packages/enex2notion/enex_uploader.py", line 20, in upload_note
    new_page = _make_page(note, root)
               ^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/enex2notion/0.2.24/libexec/lib/python3.11/site-packages/enex2notion/enex_uploader.py", line 59, in _make_page
    root.collection.add_row(
  File "/opt/homebrew/Cellar/enex2notion/0.2.24/libexec/lib/python3.11/site-packages/notion/collection.py", line 202, in add_row
    return self.add_row_block(columns=columns)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/enex2notion/0.2.24/libexec/lib/python3.11/site-packages/notion/collection.py", line 213, in add_row_block
    row_id = self._client.create_record("block", self, type="page")
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/enex2notion/0.2.24/libexec/lib/python3.11/site-packages/notion/client.py", line 416, in create_record
    with self.as_atomic_transaction():
  File "/opt/homebrew/Cellar/enex2notion/0.2.24/libexec/lib/python3.11/site-packages/notion/client.py", line 468, in __exit__
    self.client.submit_transaction(operations)
  File "/opt/homebrew/Cellar/enex2notion/0.2.24/libexec/lib/python3.11/site-packages/notion/client.py", line 323, in submit_transaction
    self.post("submitTransaction", data)
  File "/opt/homebrew/Cellar/enex2notion/0.2.24/libexec/lib/python3.11/site-packages/ratelimit/decorators.py", line 113, in wrapper
    return func(*args, **kargs)
           ^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/enex2notion/0.2.24/libexec/lib/python3.11/site-packages/ratelimit/decorators.py", line 80, in wrapper
    return func(*args, **kargs)
           ^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/enex2notion/0.2.24/libexec/lib/python3.11/site-packages/notion/client.py", line 275, in post
    return self._post(endpoint, data)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/enex2notion/0.2.24/libexec/lib/python3.11/site-packages/notion/client.py", line 290, in _post
    raise HTTPError(
requests.exceptions.HTTPError: Unsaved transactions: SpaceShardRecordPointer have no space id

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 18 (8 by maintainers)

Most upvoted comments

Should be fixed now. Check out the new version (0.2.25). Available via pypi and standalone binary for now. Homebrew will be updated in a few hours.

Seems like notion API changed, working on the fix now.

Have rerun, and can confirm the new release resolved the issue after Notion changed their API!

Thankyou for pushing out a fix so fast across all platforms. Could not believe you replied to me within 4 minutes of logging this issue, and got to work immediately to rebuild with an update in 5 hrs, wow!

I am so grateful to have stumbled across Enex2notion, could not bear to spend a whole year manually copy-pasting 1000s notes. This is an awesome tool with such clear documentation, thank you for sharing with the world Vlad!


macOS Ventura 13.0.1 (22A400) Darwin Kernel Version 22.1.0 2021 M1 Pro 16GB Cheers from Sydney 😃

Thank you for this latest fix! I had logged in here to submit this issue and found that you had already fixed it. Your software has been a lifesaver for my wholesale transfer of 1000s of Evernote notes to Notion after 12 years of using EV.

You can run multiple enex2notion instances in parallel, one per notebook for example.