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

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

Open
simonebaracchi opened this issue Sep 2, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@simonebaracchi
Copy link

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...`
@simonebaracchi simonebaracchi added the bug Something isn't working label Sep 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant