{"action":"opened","issue":{"url":"https://api.github.com/repos/jbaiter/zotero-cli/issues/11","repository_url":"https://api.github.com/repos/jbaiter/zotero-cli","labels_url":"https://api.github.com/repos/jbaiter/zotero-cli/issues/11/labels{/name}","comments_url":"https://api.github.com/repos/jbaiter/zotero-cli/issues/11/comments","events_url":"https://api.github.com/repos/jbaiter/zotero-cli/issues/11/events","html_url":"https://github.com/jbaiter/zotero-cli/issues/11","id":190520802,"number":11,"title":"`AttributeError: 'NoneType' object has no attribute 'upper'` when edit-note used with ID","user":{"login":"jdpopkin","id":3980541,"avatar_url":"https://avatars.githubusercontent.com/u/3980541?v=3","gravatar_id":"","url":"https://api.github.com/users/jdpopkin","html_url":"https://github.com/jdpopkin","followers_url":"https://api.github.com/users/jdpopkin/followers","following_url":"https://api.github.com/users/jdpopkin/following{/other_user}","gists_url":"https://api.github.com/users/jdpopkin/gists{/gist_id}","starred_url":"https://api.github.com/users/jdpopkin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jdpopkin/subscriptions","organizations_url":"https://api.github.com/users/jdpopkin/orgs","repos_url":"https://api.github.com/users/jdpopkin/repos","events_url":"https://api.github.com/users/jdpopkin/events{/privacy}","received_events_url":"https://api.github.com/users/jdpopkin/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-11-19T21:13:35Z","updated_at":"2016-11-19T21:13:35Z","closed_at":null,"body":"`zotcli edit-note BPMHDA6I` fails with this error:\r\n\r\n```Traceback (most recent call last):\r\n  File \"/usr/local/bin/zotcli\", line 9, in <module>\r\n    load_entry_point('zotero-cli', 'console_scripts', 'zotcli')()\r\n  File \"/usr/local/lib/python2.7/site-packages/click/core.py\", line 716, in __call__\r\n    return self.main(*args, **kwargs)\r\n  File \"/usr/local/lib/python2.7/site-packages/click/core.py\", line 696, in main\r\n    rv = self.invoke(ctx)\r\n  File \"/usr/local/lib/python2.7/site-packages/click/core.py\", line 1060, in invoke\r\n    return _process_result(sub_ctx.command.invoke(sub_ctx))\r\n  File \"/usr/local/lib/python2.7/site-packages/click/core.py\", line 889, in invoke\r\n    return ctx.invoke(self.callback, **ctx.params)\r\n  File \"/usr/local/lib/python2.7/site-packages/click/core.py\", line 534, in invoke\r\n    return callback(*args, **kwargs)\r\n  File \"/usr/local/lib/python2.7/site-packages/click/decorators.py\", line 17, in new_func\r\n    return f(get_current_context(), *args, **kwargs)\r\n  File \"/Users/jacksonpopkin/Developer/usr/src/oss/zotero-cli/zotero_cli/cli.py\", line 260, in edit_note\r\n    note = pick_note(ctx.obj, item_id, note_num)\r\n  File \"/Users/jacksonpopkin/Developer/usr/src/oss/zotero-cli/zotero_cli/cli.py\", line 284, in pick_note\r\n    notes = tuple(zot.notes(item_id))\r\n  File \"/Users/jacksonpopkin/Developer/usr/src/oss/zotero-cli/zotero_cli/backend.py\", line 210, in notes\r\n    notes = self._zot.children(item_id, itemType=\"note\")\r\n  File \"/usr/local/lib/python2.7/site-packages/pyzotero/zotero.py\", line 127, in wrapped_f\r\n    retrieved = self._retrieve_data(func(self, *args))\r\n  File \"/usr/local/lib/python2.7/site-packages/pyzotero/zotero.py\", line 503, in children\r\n    i=item.upper())\r\nAttributeError: 'NoneType' object has no attribute 'upper'```\r\n\r\neven though I really do have an item whose ID is `BPMHDA6I`.\r\n\r\nI think I have a fix for this. I'll clean up all my hideous printlns and submit a PR."}}
{"actor":{"display_login":"jdpopkin"}}