echo724/notion2md

Key error 'url' in information object

Closed this issue · 0 comments

 Retrieving blocks from '815a2796158b41c4990fa9a04272e9a4'
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/kin/anaconda3/envs/py37/lib/python3.7/site-packages/notion2md/exporter.py", line 18, in block_exporter
    output.write(blocks_convertor(blocks))
  File "/home/kin/anaconda3/envs/py37/lib/python3.7/site-packages/notion2md/convertor/block.py", line 109, in blocks_convertor
    outcome_blocks = "".join([result for result in results])
  File "/home/kin/anaconda3/envs/py37/lib/python3.7/site-packages/notion2md/convertor/block.py", line 109, in <listcomp>
    outcome_blocks = "".join([result for result in results])
  File "/home/kin/anaconda3/envs/py37/lib/python3.7/concurrent/futures/_base.py", line 598, in result_iterator
    yield fs.pop().result()
  File "/home/kin/anaconda3/envs/py37/lib/python3.7/concurrent/futures/_base.py", line 428, in result
    return self.__get_result()
  File "/home/kin/anaconda3/envs/py37/lib/python3.7/concurrent/futures/_base.py", line 384, in __get_result
    raise self._exception
  File "/home/kin/anaconda3/envs/py37/lib/python3.7/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/home/kin/anaconda3/envs/py37/lib/python3.7/site-packages/notion2md/convertor/block.py", line 151, in block_convertor
    outcome_block += "\t"*depth + block_convertor(block,depth)
  File "/home/kin/anaconda3/envs/py37/lib/python3.7/site-packages/notion2md/convertor/block.py", line 140, in block_convertor
    outcome_block = block_type_map[block_type](information_collector(block[block_type])) + "\n\n"
  File "/home/kin/anaconda3/envs/py37/lib/python3.7/site-packages/notion2md/convertor/block.py", line 67, in image
    return f"![{information['url']}]({information['url']})\n\n{information['caption']}"
KeyError: 'url'

It seems also have other... error like URL?

Originally posted by @Kin-Zhang in #18 (comment)