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]: .jar file cause all process failed #50

Closed
bxb100 opened this issue Sep 22, 2022 · 2 comments
Closed

[Bug]: .jar file cause all process failed #50

bxb100 opened this issue Sep 22, 2022 · 2 comments
Labels
bug Something isn't working

Comments

@bxb100
Copy link

bxb100 commented Sep 22, 2022

enex2notion version

enex2notion 0.2.18

What OS are you using?

MacOS

OS Version / Linux distribution

MacOS 13 beta

Bug description

Original note has jar file, but seems the notion don't allow upload, Can we ignore this mistake and continue the converting process?

Log excerpt

WARNING: Failed to upload note 'xxxxxxxxxx' to Notion! Retrying...
 11%|████▌                                    | 2/18 [00:19<02:41, 10.12s/block]ERROR: Got 400 error attempting to POST to getUploadFileUrl, with data: {
  "bucket": "secure",
  "name": "commons-jexl-2.1.1.jar",
  "contentType": "application/octet-stream",
  "record": {
    "table": "block",
    "id": "be3268c5-993a-46a1-9b07-d2534910c41d",
    "spaceId": "90498861-ad69-4209-93af-29c4b6309733"
  }
Traceback (most recent call last):
  File "/opt/homebrew/Cellar/enex2notion/0.2.18/libexec/lib/python3.10/site-packages/enex2notion/enex_uploader.py", line 28, in upload_note
    upload_block(new_page, block)
  File "/opt/homebrew/Cellar/enex2notion/0.2.18/libexec/lib/python3.10/site-packages/enex2notion/enex_uploader_block.py", line 16, in upload_block
    _upload_file(new_block, block.resource)
  File "/opt/homebrew/Cellar/enex2notion/0.2.18/libexec/lib/python3.10/site-packages/enex2notion/enex_uploader_block.py", line 41, in _upload_file
    upload_data = new_block._client.post(  # noqa: WPS437
  File "/opt/homebrew/Cellar/enex2notion/0.2.18/libexec/lib/python3.10/site-packages/ratelimit/decorators.py", line 113, in wrapper
    return func(*args, **kargs)
  File "/opt/homebrew/Cellar/enex2notion/0.2.18/libexec/lib/python3.10/site-packages/ratelimit/decorators.py", line 80, in wrapper
    return func(*args, **kargs)
  File "/opt/homebrew/Cellar/enex2notion/0.2.18/libexec/lib/python3.10/site-packages/notion/client.py", line 275, in post
    return self._post(endpoint, data)
  File "/opt/homebrew/Cellar/enex2notion/0.2.18/libexec/lib/python3.10/site-packages/notion/client.py", line 290, in _post
    raise HTTPError(
requests.exceptions.HTTPError: Uploading .jar files is not allowed

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/opt/homebrew/bin/enex2notion", line 8, in <module>
    sys.exit(main())
  File "/opt/homebrew/Cellar/enex2notion/0.2.18/libexec/lib/python3.10/site-packages/enex2notion/cli.py", line 47, in main
    cli(sys.argv[1:])
  File "/opt/homebrew/Cellar/enex2notion/0.2.18/libexec/lib/python3.10/site-packages/enex2notion/cli.py", line 32, in cli
    _process_input(enex_uploader, args.enex_input)
  File "/opt/homebrew/Cellar/enex2notion/0.2.18/libexec/lib/python3.10/site-packages/enex2notion/cli.py", line 42, in _process_input
    enex_uploader.upload_notebook(path)
  File "/opt/homebrew/Cellar/enex2notion/0.2.18/libexec/lib/python3.10/site-packages/enex2notion/cli_upload.py", line 56, in upload_notebook
    self.upload_note(note, note_idx)
  File "/opt/homebrew/Cellar/enex2notion/0.2.18/libexec/lib/python3.10/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.18/libexec/lib/python3.10/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.18/libexec/lib/python3.10/site-packages/enex2notion/enex_uploader.py", line 35, in upload_note
    raise NoteUploadFailException
enex2notion.utils_exceptions.NoteUploadFailException
@bxb100 bxb100 added the bug Something isn't working label Sep 22, 2022
@vzhd1701
Copy link
Owner

Done. Homebrew version should be updated in a few hours.

@bxb100
Copy link
Author

bxb100 commented Sep 22, 2022

Nice work, Thanks

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

2 participants