malinkang / weread2notion-pro

2.35k stars 4.61k forks source link

运行了一半显示报错 #43

Closed dective1234 closed 2 months ago

dective1234 commented 2 months ago

运行了一半显示报错,看书架上已经有部分书了 IMG_20240908_135647

dective1234 commented 2 months ago

Traceback (most recent call last): File "/opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/site-packages/notion_client/client.py", line 118, in _parse_response response.raise_for_status() File "/opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/site-packages/httpx/_models.py", line 763, 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://developer.mozilla.org/en-US/docs/Web/HTTP/Status/400

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/home/runner/work/weread2notion-pro/weread2notion-pro/scripts/book.py", line 183, in insert_book_to_notion(books, index, bookId) File "/home/runner/work/weread2notion-pro/weread2notion-pro/scripts/book.py", line 136, in insert_book_to_notion notion_helper.create_page( File "/opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/site-packages/retrying.py", line 56, in wrapped_f return Retrying(*dargs, dkw).call(f, *args, *kw) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/site-packages/retrying.py", line 266, in call raise attempt.get() ^^^^^^^^^^^^^ File "/opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/site-packages/retrying.py", line 301, in get six.reraise(self.value[0], self.value[1], self.value[2]) File "/opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/site-packages/six.py", line 719, in reraise raise value File "/opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/site-packages/retrying.py", line 251, in call attempt = Attempt(fn(args, kwargs), attempt_number, False) ^^^^^^^^^^^^^^^^^^^ File "/home/runner/work/weread2notion-pro/weread2notion-pro/scripts/notion_helper.py", line 304, in create_page return self.client.pages.create(parent=parent, properties=properties, icon=icon) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/site-packages/notion_client/api_endpoints.py", line 208, in create return self.parent.request( ^^^^^^^^^^^^^^^^^^^^ File "/opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/site-packages/notion_client/client.py", line 194, in request return self._parse_response(response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/site-packages/notion_client/client.py", line 126, in _parse_response raise APIResponseError(response, body["message"], code) notion_client.errors.APIResponseError: body failed validation: body.icon.external.url should be a string, instead was null. Error: Process completed with exit code 1.

dective1234 commented 2 months ago

没问题了,以前APP里面有一些公众号文章的笔记之类的,删了就好了