Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removed the None return in main gui function #13

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

floffy-f
Copy link

@floffy-f floffy-f commented Feb 5, 2025

Replace with [] return for "no document selected", to avoid crash on papis side when the user quits Rofi, with either the dedicated quit key (Alt+q) or the escape key.

The error used to be :

Traceback (most recent call last):
  File /home/<myusername>/.local/bin/papis, line 8, in <module>
    sys.exit(run())
  File /usr/lib/python3/dist-packages/click/core.py, line 1128, in __call__
    return self.main(*args, **kwargs)
  File /usr/lib/python3/dist-packages/click/core.py, line 1053, in main
    rv = self.invoke(ctx)
  File /usr/lib/python3/dist-packages/click/core.py, line 1659, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File /usr/lib/python3/dist-packages/click/core.py, line 1395, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File /usr/lib/python3/dist-packages/click/core.py, line 754, in invoke
    return __callback(*args, **kwargs)
  File /home/<myusername>/.local/lib/python3.10/site-packages/papis/commands/edit.py, line 101, in cli
    documents = papis.cli.handle_doc_folder_query_all_sort(query,
  File /home/<myusername>/.local/lib/python3.10/site-packages/papis/cli.py, line 162, in handle_doc_folder_query_all_sort
    documents = [doc for doc in papis.pick.pick_doc(documents) if doc]
TypeError: 'NoneType' object is not iterable

Replace with [] return for "no document selected", to avoid crash on
papis side.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant