jacksalici / notion-cli-list-manager

A simple command-line tool for managing Notion databases.
MIT License
94 stars 6 forks source link

Error when trying to display person + relation type properties #9

Open jshum opened 1 year ago

jshum commented 1 year ago
Traceback (most recent call last):
  File "/usr/local/bin/list", line 8, in <module>
    sys.exit(app())
  File "/usr/local/lib/python3.9/site-packages/typer/main.py", line 214, in __call__
    return get_command(self)(*args, **kwargs)
  File "/usr/local/lib/python3.9/site-packages/click/core.py", line 1157, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python3.9/site-packages/click/core.py", line 1078, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python3.9/site-packages/click/core.py", line 1666, in invoke
    rv = super().invoke(ctx)
  File "/usr/local/lib/python3.9/site-packages/click/core.py", line 1434, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python3.9/site-packages/click/core.py", line 783, in invoke
    return __callback(*args, **kwargs)
  File "/usr/local/lib/python3.9/site-packages/typer/main.py", line 532, in wrapper
    return callback(**use_params)  # type: ignore
  File "/usr/local/lib/python3.9/site-packages/notion_cli_list_manager/main.py", line 122, in main
    page.all(db)
  File "/usr/local/lib/python3.9/site-packages/notion_cli_list_manager/page.py", line 38, in all
    index, x, pages_dict = page.query(database, x = x, properties_list=properties_list)
  File "/usr/local/lib/python3.9/site-packages/notion_cli_list_manager/page.py", line 142, in query
    full_string += p.get("name") + " "
TypeError: unsupported operand type(s) for +: 'NoneType' and 'str'

Think it has issues when trying to display a Person + Relation type property. I think you don't support it in the code right now but would be cool if it did

jacksalici commented 1 year ago

Thanks for pointing that out, I will try to include that in the next major version of the app!