malinkang / douban2notion

177 stars 382 forks source link

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

Open fxrcode opened 1 month ago

fxrcode commented 1 month ago
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 `""`.