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

Error during export #11

Closed
bongiozzo opened this issue Mar 29, 2023 · 2 comments
Closed

Error during export #11

bongiozzo opened this issue Mar 29, 2023 · 2 comments

Comments

@bongiozzo
Copy link

Interface of Notion's share form doesn't allow to choose Integration as client.
So I create Global Web Share Link for Root page and specify it
https://rain-puppy-6dd.notion.site/Root-Page-ID

Script output:

Loading access token from keyring
Logging into Google Keep
Password:
Authenticating, this may take a while...
Authentication is successful, saving token in keyring
Token saved. Have fun with other commands!
Logging into Notion
Traceback (most recent call last):
  File "C:\Users\Sergey\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\notion_client\client.py", line 116, in _parse_response
    response.raise_for_status()
  File "C:\Users\Sergey\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\httpx\_models.py", line 749, in raise_for_status
    raise HTTPStatusError(message, request=request, response=self)
httpx.HTTPStatusError: Client error '400 Bad Request' for url 'https://api.notion.com/v1/pages'
For more information check: https://httpstatuses.com/400

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\Sergey\Downloads\gkeep2notion-main\gkeep2notion-main\gkeep2notion.py", line 372, in <module>
    create_page(notion, notes)
  File "C:\Users\Sergey\Downloads\gkeep2notion-main\gkeep2notion-main\gkeep2notion.py", line 168, in create_page
    notion_page = notion.pages.create(parent=page.parent,
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Sergey\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\notion_client\api_endpoints.py", line 197, in create
    return self.parent.request(
           ^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Sergey\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\notion_client\client.py", line 192, in request
    return self._parse_response(response)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Sergey\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\notion_client\client.py", line 124, in _parse_response
    raise APIResponseError(response, body["message"], code)
notion_client.errors.APIResponseError: body failed validation. Fix one:
body.parent.database_id should be defined, instead was `undefined`.
body.parent.page_id should be a valid uuid, instead was `""`.
@trustmaster
Copy link
Owner

Seems like Notion has changed sharing and integrations. Could you check if the new instructions from #14 solve your issue?

@trustmaster
Copy link
Owner

Now that I look at this ticket again, the problem was in the root page URL: https://rain-puppy-6dd.notion.site/Root-Page-ID. This tool currently doesn't support custom domains, it needs a URL from https://notion.so to work. A workaround is to translate your public site link into a regular notion.so link, as the only part needed is the ID of the page.

@trustmaster trustmaster closed this as not planned Won't fix, can't repro, duplicate, stale Jun 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants