This repository was archived by the owner on Nov 14, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6
This repository was archived by the owner on Nov 14, 2021. It is now read-only.
HTTPError: invalid input as error Issues #28
Copy link
Copy link
Closed
Description
재현
client = NotionClient(token_v2=NOTION_TOKEN)
contents_collection = client.get_collection(collection_id=COLLECTION_ID)
posts = contents_collection.get_rows()
for post in posts:
print(post)현상
File "get_database_id.py", line 16, in <module>
posts = contents_collection.get_rows()
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/notion/collection.py", line 239, in get_rows
return self.query(**kwargs)
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/notion/collection.py", line 236, in query
return CollectionQuery(self, self._get_a_collection_view(), **kwargs).execute()
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/notion/collection.py", line 230, in _get_a_collection_view
parent = self.parent
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/notion/collection.py", line 224, in parent
return self._client.get_block(self.get("parent_id"))
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/notion/client.py", line 169, in get_block
block = self.get_record_data("block", block_id, force_refresh=force_refresh)
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/notion/client.py", line 162, in get_record_data
return self._store.get(table, id, force_refresh=force_refresh)
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/notion/store.py", line 184, in get
self.call_load_page_chunk(id)
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/notion/store.py", line 286, in call_load_page_chunk
recordmap = self._client.post("loadPageChunk", data).json()["recordMap"]
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/notion/client.py", line 260, in post
raise HTTPError(
requests.exceptions.HTTPError: Invalid input.원인
얼마 전 notion api 의 스펙이 바뀐 듯 합니다.
notion.store.RecordStore.call_load_page_chunk 에서 data 딕셔너리의 limit이 너무 커서 발생하는 에러입니다.
(jamalex/notion-py#301)
해결방법
Metadata
Metadata
Assignees
Labels
No labels