selfboot / html2notion

This tool can accurately convert HTML to Notion notes and is also useful for exporting Evernote notes to Notion.
MIT License
99 stars 3 forks source link

出错了无法搞定,不知道是什么原因呢? #16

Closed xtayaitak closed 11 months ago

xtayaitak commented 11 months ago

麻烦问一下数据库的ID是网址后面的32位吗?我目前就是这样做的。

image

日志是这样的。 2023-10-01 17:43:00,212 - DEBUG - _trace.py:85 - start_tls.complete return_value=<httpcore._backends.anyio.AnyIOStream object at 0x0000016309CC0160> 2023-10-01 17:43:00,212 - DEBUG - _trace.py:85 - send_request_headers.started request=<Request [b'POST']> 2023-10-01 17:43:00,213 - DEBUG - _trace.py:85 - send_request_headers.complete 2023-10-01 17:43:00,213 - DEBUG - _trace.py:85 - send_request_body.started request=<Request [b'POST']> 2023-10-01 17:43:00,214 - DEBUG - _trace.py:85 - send_request_body.complete 2023-10-01 17:43:00,214 - DEBUG - _trace.py:85 - receive_response_headers.started request=<Request [b'POST']> 2023-10-01 17:43:00,337 - DEBUG - _trace.py:85 - send_request_headers.started request=<Request [b'POST']> 2023-10-01 17:43:00,338 - DEBUG - _trace.py:85 - send_request_headers.complete 2023-10-01 17:43:00,338 - DEBUG - _trace.py:85 - send_request_body.started request=<Request [b'POST']> 2023-10-01 17:43:00,338 - DEBUG - _trace.py:85 - send_request_body.complete 2023-10-01 17:43:00,338 - DEBUG - _trace.py:85 - receive_response_headers.started request=<Request [b'POST']> 2023-10-01 17:43:00,355 - DEBUG - _trace.py:85 - receive_response_headers.complete return_value=(b'HTTP/1.1', 404, b'Not Found', [(b'Date', b'Sun, 01 Oct 2023 09:43:00 GMT'), (b'Content-Type', b'application/json; charset=utf-8'), (b'Transfer-Encoding', b'chunked'), (b'Connection', b'keep-alive'), (b'X-Powered-By', b'Express'), (b'X-Notion-Request-Id', b'8316814e-b592-4e09-a9a9-771f499ad88f'), (b'ETag', b'W/"d9-s1nQExXzklzcnvFLpuaVCxgv3lU"'), (b'Vary', b'Accept-Encoding'), (b'CF-Cache-Status', b'DYNAMIC'), (b'Server', b'cloudflare'), (b'CF-RAY', b'80f3c242ddb42710-SJC'), (b'Content-Encoding', b'gzip')]) 2023-10-01 17:43:00,355 - INFO - _client.py:1729 - HTTP Request: POST https://api.notion.com/v1/pages "HTTP/1.1 404 Not Found" 2023-10-01 17:43:00,355 - DEBUG - _trace.py:85 - receive_response_body.started request=<Request [b'POST']> 2023-10-01 17:43:00,356 - DEBUG - _trace.py:85 - receive_response_body.complete 2023-10-01 17:43:00,356 - DEBUG - _trace.py:85 - response_closed.started 2023-10-01 17:43:00,356 - DEBUG - _trace.py:85 - response_closed.complete 2023-10-01 17:43:00,357 - ERROR - notion_import.py:36 - Error create notion page F:\personal\enote_Export_20231001\CListCtrl 分组.html: Could not find database with ID: eb95d98d-a8cb-45e6-b655-508b68a5ce0a. Make sure the relevant pages and databases are shared with your integration., Traceback (most recent call last): File "f:\setup\pycharm\generaluseenv\lib\site-packages\notion_client\client.py", line 118, in _parse_response response.raise_for_status() File "f:\setup\pycharm\generaluseenv\lib\site-packages\httpx_models.py", line 749, in raise_for_status raise HTTPStatusError(message, request=request, response=self) httpx.HTTPStatusError: Client error '404 Not Found' for url 'https://api.notion.com/v1/pages' For more information check: https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/404

xtayaitak commented 11 months ago

是我的数据库id弄错了。现在好点300多个失败的是6个。应该可以了。谢谢