sballin / alfred-search-notes-app

Use Alfred to quickly open notes in iCloud/Apple Notes.
https://www.alfredforum.com/topic/11716-search-appleicloud-notes/
MIT License
510 stars 24 forks source link

TypeError: 'NoneType' object has no attribute '__getitem__' #3

Closed mrmartineau closed 5 years ago

mrmartineau commented 5 years ago

I just downloaded the package from Packal but it does not work, here's the debug data:

[2018-08-10 00:07:22][ERROR: input.scriptfilter] Code 1: Traceback (most recent call last):
  File "/Users/stevejobs/path/to/Alfred.alfredpreferences/workflows/user.workflow.43CB9AFF-A420-4B19-8C99-C393EC988448/searchNotes.py", line 35, in <module>
    for m in matches]
TypeError: 'NoneType' object has no attribute '__getitem__'

Let me know if you need me to provide you with more info. FYI, I am on High Sierra at the moment too

mrmartineau commented 5 years ago

FYI, I used the code in @richvreeland's PR and the workflow now works.

sballin commented 5 years ago

Thanks, I'm about to merge it!

sballin commented 5 years ago

Fixed as of v1.1. Added an extra check to make sure the note body is not None, which could also lead to this error.