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

body.properties.出版社.multi_select[2].id should be defined, instead was undefined. #7

Open
fxrcode opened this issue Jul 22, 2024 · 0 comments

Comments

@fxrcode
Copy link

fxrcode commented Jul 22, 2024

Traceback (most recent call last):
  File "/opt/hostedtoolcache/Python/3.9.19/x64/lib/python3.9/site-packages/notion_client/client.py", line 118, in _parse_response
    response.raise_for_status()
  File "/opt/hostedtoolcache/Python/3.9.19/x64/lib/python3.9/site-packages/httpx/_models.py", line 761, 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/douban2notion/douban2notion/scripts/douban.py", line 255, in <module>
    insert_book()
  File "/home/runner/work/douban2notion/douban2notion/scripts/douban.py", line 239, in insert_book
    notion_helper.create_page(
  File "/opt/hostedtoolcache/Python/3.9.19/x64/lib/python3.9/site-packages/retrying.py", line 56, in wrapped_f
    return Retrying(*dargs, **dkw).call(f, *args, **kw)
  File "/opt/hostedtoolcache/Python/3.9.19/x64/lib/python3.9/site-packages/retrying.py", line 266, in call
    raise attempt.get()
  File "/opt/hostedtoolcache/Python/3.9.19/x64/lib/python3.9/site-packages/retrying.py", line 301, in get
    six.reraise(self.value[0], self.value[1], self.value[2])
  File "/opt/hostedtoolcache/Python/3.9.19/x64/lib/python3.9/site-packages/six.py", line 719, in reraise
    raise value
  File "/opt/hostedtoolcache/Python/3.9.19/x64/lib/python3.9/site-packages/retrying.py", line 251, in call
    attempt = Attempt(fn(*args, **kwargs), attempt_number, False)
  File "/home/runner/work/douban2notion/douban2notion/scripts/notion_helper.py", line 213, in create_page
    return self.client.pages.create(parent=parent, properties=properties, icon=icon)
  File "/opt/hostedtoolcache/Python/3.9.19/x64/lib/python3.9/site-packages/notion_client/api_endpoints.py", line 208, in create
    return self.parent.request(
  File "/opt/hostedtoolcache/Python/3.9.19/x64/lib/python3.9/site-packages/notion_client/client.py", line 194, in request
    return self._parse_response(response)
  File "/opt/hostedtoolcache/Python/3.9.19/x64/lib/python3.9/site-packages/notion_client/client.py", line 126, in _parse_response
    raise APIResponseError(response, body["message"], code)
notion_client.errors.APIResponseError: body failed validation. Fix one:
body.properties.出版社.multi_select[2].id should be defined, instead was `undefined`.
body.properties.出版社.multi_select[2].name should be populated, instead was `""`.
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

1 participant