echo724 / notion2md

Notion Markdown Exporter with Python Cli
MIT License
682 stars 54 forks source link

Error #13

Closed lishangjing-spec closed 2 years ago

lishangjing-spec commented 3 years ago
Traceback (most recent call last):
  File "/usr/local/Cellar/python@3.9/3.9.2_1/Frameworks/Python.framework/Versions/3.9/lib/python3.9/runpy.py", line 197, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/usr/local/Cellar/python@3.9/3.9.2_1/Frameworks/Python.framework/Versions/3.9/lib/python3.9/runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "/Users/tianmeiwz/Downloads/notion2md-main/notion2md/__main__.py", line 4, in <module>
    export_cli()
  File "/Users/tianmeiwz/Downloads/notion2md-main/notion2md/export_manager.py", line 28, in export_cli
    exporter = PageBlockExporter(url,client,blog_mode=blog_mode)
  File "/Users/tianmeiwz/Downloads/notion2md-main/notion2md/exporter.py", line 9, in __init__
    self.page = self.client.get_block(url)
  File "/usr/local/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 "/usr/local/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 "/usr/local/lib/python3.9/site-packages/notion/store.py", line 184, in get
    self.call_load_page_chunk(id)
  File "/usr/local/lib/python3.9/site-packages/notion/store.py", line 286, in call_load_page_chunk
    recordmap = self._client.post("loadPageChunk", data).json()["recordMap"]
  File "/usr/local/lib/python3.9/site-packages/notion/client.py", line 260, in post
    raise HTTPError(
requests.exceptions.HTTPError: Invalid input.
Tomaaso commented 3 years ago

Same problem, do you have a solution ?

Tomaaso commented 3 years ago

Ok i found an issue, we can't convert a page wich is in a database. Just have to copy the page outside the database, or add to favorites, it's working too. But i have an another problem, image are not dowload.

echo724 commented 3 years ago

I think that is problem of notion-py. It has same problem on its own. See https://github.com/jamalex/notion-py/pull/294. For now, they should fix this for notion2md to work well. Thank you