paperboi / kindle2notion

Export all clippings from your Kindle device to a database in Notion.
https://pypi.org/project/kindle2notion/
MIT License
904 stars 120 forks source link

Unable to run kindle2notion #32

Closed guptaanmol184 closed 3 years ago

guptaanmol184 commented 3 years ago

I am getting the following error when attempting to run kindle2notion python package.

Executed Command: kindle2notion 86j559ih250... https://www.notion.so/h1l947gj1... '.\Desktop\My Clippings.txt'

Error recieved:

Traceback (most recent call last):
  File "C:\Users\trimble\AppData\Local\Programs\Python\Python39\Scripts\kindle2notion-script.py", line 33, in <module>
    sys.exit(load_entry_point('kindle2notion', 'console_scripts', 'kindle2notion')())
  File "c:\users\trimble\appdata\local\programs\python\python39\lib\site-packages\click\core.py", line 1134, in __call__
    return self.main(*args, **kwargs)
  File "c:\users\trimble\appdata\local\programs\python\python39\lib\site-packages\click\core.py", line 1059, in main
    rv = self.invoke(ctx)
  File "c:\users\trimble\appdata\local\programs\python\python39\lib\site-packages\click\core.py", line 1401, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "c:\users\trimble\appdata\local\programs\python\python39\lib\site-packages\click\core.py", line 767, in invoke
    return __callback(*args, **kwargs)
  File "c:\users\trimble\desktop\shortcuts\playground\fun\kindle2notion\kindle2notion\__main__.py", line 20, in main
    notion_collection_view = notion_client.get_collection_view(notion_table_id)
  File "c:\users\trimble\appdata\local\programs\python\python39\lib\site-packages\notion\client.py", line 165, in get_collection_view
    collection = self.get_block(
  File "c:\users\trimble\appdata\local\programs\python\python39\lib\site-packages\notion\client.py", line 118, in get_block
    block = self.get_record_data("block", block_id, force_refresh=force_refresh)
  File "c:\users\trimble\appdata\local\programs\python\python39\lib\site-packages\notion\client.py", line 111, in get_record_data
    return self._store.get(table, id, force_refresh=force_refresh)
  File "c:\users\trimble\appdata\local\programs\python\python39\lib\site-packages\notion\store.py", line 184, in get
    self.call_load_page_chunk(id)
  File "c:\users\trimble\appdata\local\programs\python\python39\lib\site-packages\notion\store.py", line 286, in call_load_page_chunk
    recordmap = self._client.post("loadPageChunk", data).json()["recordMap"]
  File "c:\users\trimble\appdata\local\programs\python\python39\lib\site-packages\notion\client.py", line 209, in post
    raise HTTPError(
requests.exceptions.HTTPError: Invalid input.
paperboi commented 3 years ago

Hey Anmol, thanks for bringing this up. Try following the instructions in #14 and let me know if it works out for you.

guptaanmol184 commented 3 years ago

Hey @paperboi, thanks for sharing that, it fixed the issue. Thanks for this, worked like a charm!