Skip to content

[Bug]: [11712] Failed to execute script '__main__' due to unhandled exception! (enex2notion.utils_exceptions.NoteUploadFailException) #121

@simonebaracchi

Description

@simonebaracchi

enex2notion version

0.3.1

What OS are you using?

Windows

OS Version / Linux distribution

Windows 10 Pro

Bug description

After uploading several notes, the process interrupts with this stack trace:

`INFO: Uploading note 4 out of 17 'Camera da letto'
WARNING: Failed to upload note 'Camera da letto' to Notion! Retrying...
WARNING: Failed to upload note 'Camera da letto' to Notion! Retrying...
WARNING: Failed to upload note 'Camera da letto' to Notion! Retrying...
WARNING: Failed to upload note 'Camera da letto' to Notion! Retrying...
ERROR: Failed to upload note 'Camera da letto' to Notion!
Traceback (most recent call last):
File "enex2notion\enex_uploader.py", line 20, in upload_note
File "enex2notion\enex_uploader.py", line 35, in _upload_note
File "enex2notion\enex_uploader_block.py", line 17, in upload_block
File "enex2notion\enex_uploader_block.py", line 51, in _upload_file
File "requests\models.py", line 1021, in raise_for_status
requests.exceptions.HTTPError: 400 Client Error: Bad Request for url: https://prod-files-secure.s3.us-west-2.amazonaws.com/(very very long url omitted for readability)&x-id=PutObject

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "enex2notion_main_.py", line 4, in
File "enex2notion\cli.py", line 47, in main
File "enex2notion\cli.py", line 32, in cli
File "enex2notion\cli.py", line 40, in _process_input
File "enex2notion\cli_upload.py", line 66, in upload_notebook
File "enex2notion\cli_upload.py", line 90, in upload_note
File "enex2notion\cli_upload.py", line 118, in _upload_note
File "enex2notion\cli_upload.py", line 130, in _attempt_upload
File "enex2notion\enex_uploader.py", line 22, in upload_note
enex2notion.utils_exceptions.NoteUploadFailException
[11712] Failed to execute script 'main' due to unhandled exception!
`

It may be interesting to point out that the failing note contains a somewhat large amount of images (about 35) adding up to some megabytes.

Log excerpt

Not much more info:

`DEBUG: Creating new page for note 'Camera da letto'
DEBUG: Upload error:
Traceback (most recent call last):
  File "enex2notion\enex_uploader.py", line 20, in upload_note
  File "enex2notion\enex_uploader.py", line 35, in _upload_note
  File "enex2notion\enex_uploader_block.py", line 17, in upload_block
  File "enex2notion\enex_uploader_block.py", line 51, in _upload_file
  File "requests\models.py", line 1021, in raise_for_status
requests.exceptions.HTTPError: 400 Client Error: Bad Request for url: https://prod-files-secure.s3.us-west-2.amazonaws.com/(very very long url)

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "enex2notion\cli_upload.py", line 130, in _attempt_upload
  File "enex2notion\enex_uploader.py", line 22, in upload_note
enex2notion.utils_exceptions.NoteUploadFailException
WARNING: Failed to upload note 'Camera da letto' to Notion! Retrying...`

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions