Skip to content

400 error when getting collection view #11

Closed
@heyflorin

Description

@heyflorin

Tracceback is below. Quick start instructions worked fine on a page, but when trying to pick up a database/collection I get the following. Any suggestions, and thanks!

File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python3.7/site-packages/notion/client.py", line 98, in get_collection_view
    collection = self.get_block(block_id, force_refresh=force_refresh).collection
  File "/usr/local/lib/python3.7/site-packages/cached_property.py", line 35, in __get__
    value = obj.__dict__[self.func.__name__] = self.func(obj)
  File "/usr/local/lib/python3.7/site-packages/notion/block.py", line 618, in collection
    self._collection = self._client.get_collection(collection_id)
  File "/usr/local/lib/python3.7/site-packages/notion/client.py", line 70, in get_collection
    return Collection(self, collection_id) if coll else None
  File "/usr/local/lib/python3.7/site-packages/notion/collection.py", line 104, in __init__
    self._client.refresh_collection_rows(self.id)
  File "/usr/local/lib/python3.7/site-packages/notion/client.py", line 115, in refresh_collection_rows
    row_ids = self.search_pages_with_parent(collection_id)
  File "/usr/local/lib/python3.7/site-packages/notion/client.py", line 172, in search_pages_with_parent
    response = self.post("searchPagesWithParent", data).json()
  File "/usr/local/lib/python3.7/site-packages/notion/client.py", line 126, in post
    raise HTTPError(response.json().get("message", "There was an error (400) submitting the request."))
requests.exceptions.HTTPError: Invalid input.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions