{"action":"created","issue":{"url":"https://api.github.com/repos/snarfed/bridgy/issues/419","labels_url":"https://api.github.com/repos/snarfed/bridgy/issues/419/labels{/name}","comments_url":"https://api.github.com/repos/snarfed/bridgy/issues/419/comments","events_url":"https://api.github.com/repos/snarfed/bridgy/issues/419/events","html_url":"https://github.com/snarfed/bridgy/issues/419","id":90404160,"number":419,"title":"twitter publish crash: unhashable type: 'dict'","user":{"login":"snarfed","id":778068,"avatar_url":"https://avatars.githubusercontent.com/u/778068?v=3","gravatar_id":"","url":"https://api.github.com/users/snarfed","html_url":"https://github.com/snarfed","followers_url":"https://api.github.com/users/snarfed/followers","following_url":"https://api.github.com/users/snarfed/following{/other_user}","gists_url":"https://api.github.com/users/snarfed/gists{/gist_id}","starred_url":"https://api.github.com/users/snarfed/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/snarfed/subscriptions","organizations_url":"https://api.github.com/users/snarfed/orgs","repos_url":"https://api.github.com/users/snarfed/repos","events_url":"https://api.github.com/users/snarfed/events{/privacy}","received_events_url":"https://api.github.com/users/snarfed/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/snarfed/bridgy/labels/now","name":"now","color":"009800"},{"url":"https://api.github.com/repos/snarfed/bridgy/labels/publish","name":"publish","color":"5319e7"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2015-06-23T14:28:01Z","updated_at":"2015-06-23T21:53:45Z","closed_at":null,"body":"discovered by @diplix (https://www.brid.gy/twitter/diplix). [log](https://www.brid.gy/log?start_time=1435068803&key=aglzfmJyaWQtZ3lyVgsSDVB1Ymxpc2hlZFBhZ2UiL2h0dHA6Ly93aXJyZXMubmV0L2FydGljbGUvYXJ0aWNsZXZpZXcvNzkyMy8xLzYvDAsSB1B1Ymxpc2gYgICAgIDkkQoM):\r\n\r\n```\r\nI Params: [(u'source', u'http://wirres.net/7923'), (u'target', u'http://brid.gy/publish/twitter'), (u'bridgy_omit_link', u'')]\r\nD Resolved http://wirres.net/7923 to http://wirres.net/article/articleview/7923/1/6/\r\nI Source: https://www.brid.gy/twitter/diplix , features [u'publish', u'listen'], status enabled\r\nD Publish entity: aglzfmJyaWQtZ3lyVgsSDVB1Ymxpc2hlZFBhZ2UiL2h0dHA6Ly93aXJyZXMubmV0L2FydGljbGUvYXJ0aWNsZXZpZXcvNzkyMy8xLzYvDAsSB1B1Ymxpc2gYgICAgIDkkQoM\r\nI Starting new HTTP connection (1): wirres.net\r\nD \"GET /article/articleview/7923/1/6/ HTTP/1.1\" 200 None\r\nD Parsed microformats2: {\r\n...\r\n\"items\": [\r\n{\r\n\"type\": [\r\n\"h-entry\"\r\n],\r\n\"properties\": {\r\n\"category\": [\r\n\"\"\r\n],\r\n\"updated\": [\r\n\"2015-06-23T16:13:01+0200\"\r\n],\r\n\"name\": [\r\n\"\",\r\n\"\"\r\n],\r\n\"author\": [\r\n{\r\n\"type\": [\r\n\"h-card\"\r\n],\r\n\"properties\": {\r\n\"url\": [\r\n\"http://wirres.net\"\r\n],\r\n\"photo\": [\r\n\"http://root.wirres.net/03022687630_h2.jpg\"\r\n],\r\n\"name\": [\r\n\"felix schwenzel\"\r\n]\r\n},\r\n\"value\": \" felix schwenzel\"\r\n}\r\n],\r\n\"url\": [\r\n\"http://wirres.net/article/articleview/7923/1/6/\"\r\n],\r\n\"content\": [\r\n{\r\n\"html\": \"\\n<div class=\\\"h-cite p-repost-of repost-of linkitemq key\\\" id=\\\"link-b2caaf8f031ec16506d51e1e4bed061a\\\">\\n<p><img http:=\\\"\\\" src=\\\"&lt;/p&gt;\\n&lt;link href=\\\" target=\\\"_blank\\\" text=\\\"http://root.wirres.net/favicon.php?url=https%3A%2F%2Fwww.flickr.com%2Fphotos%2F134213681%40N05%2F19035489016%2Fin%2Fphotostream%2F\\\"/>\\\" align=\\\"top\\\" width=\\\"16\\\" height=\\\"16\\\" alt=\\\"*\\\" /&gt;\\u00a0<a href=\\\"\\n&lt;link href=\\\" https:=\\\"\\\" target=\\\"_blank\\\" text=\\\"https://www.flickr.com/photos/134213681@N05/19035489016/in/photostream/\\\"></a>\\\" class=\\\"linktitle u-url space p-name\\\"&gt;IMG_6270_1</p>\\n<p><a class=\\\"h-card vcard author p-author u-url p-name fn value name\\\" href=\\\"&lt;/p&gt;\\n&lt;link href=\\\" https:=\\\"\\\" target=\\\"_blank\\\" text=\\\"https://www.flickr.com/photos/134213681@N05/\\\"></a>\\\"&gt;Nebenan. Freundliche Internet-Konferenz:</p>\\n<blockquote class=\\\"e-content\\\"><p>Foto: Amelie Nerger, @nergera CC-Lizenz BY-NC-SA</p></blockquote>\\n</div>\\n<p><a href=\\\"https://www.brid.gy/publish/facebook\\\"></a><a href=\\\"https://www.brid.gy/publish/twitter\\\"></a></p>\\n<a name=\\\"mehr\\\"></a>\\n\",\r\n\"value\": \"\\n\\n\\\" align=\\\"top\\\" width=\\\"16\\\" height=\\\"16\\\" alt=\\\"*\\\" />\\u00a0\\\" class=\\\"linktitle u-url space p-name\\\">IMG_6270_1\\n\\\">Nebenan. Freundliche Internet-Konferenz:\\nFoto: Amelie Nerger, @nergera CC-Lizenz BY-NC-SA\\n\\n\\n\\n\"\r\n}\r\n],\r\n\"published\": [\r\n\"2015-06-23T16:13:01+0200\"\r\n],\r\n\"repost-of\": [\r\n\"https://www.flickr.com/photos/134213681@N05/19035489016/in/photostream/\",\r\n{\r\n\"type\": [\r\n\"h-cite\"\r\n],\r\n\"properties\": {\r\n\"url\": [\r\n{\r\n\"type\": [\r\n\"h-card\"\r\n],\r\n\"properties\": {\r\n\"url\": [\r\n\"http://wirres.net/article/articleview/7923/1/6/</p>;\\n<link href=\"\r\n],\r\n\"name\": [\r\n\"\"\r\n]\r\n},\r\n\"value\": \"\"\r\n}\r\n],\r\n\"content\": [\r\n{\r\n\"html\": \"<p>Foto: Amelie Nerger, @nergera CC-Lizenz BY-NC-SA</p>\",\r\n\"value\": \"Foto: Amelie Nerger, @nergera CC-Lizenz BY-NC-SA\"\r\n}\r\n],\r\n\"name\": [\r\n{\r\n\"type\": [\r\n\"h-card\"\r\n],\r\n\"properties\": {\r\n\"url\": [\r\n\"http://wirres.net/article/articleview/7923/1/6/</p>;\\n<link href=\"\r\n],\r\n\"name\": [\r\n\"\"\r\n]\r\n},\r\n\"value\": \"\"\r\n}\r\n],\r\n\"author\": [\r\n{\r\n\"type\": [\r\n\"h-card\"\r\n],\r\n\"properties\": {\r\n\"url\": [\r\n\"http://wirres.net/article/articleview/7923/1/6/</p>;\\n<link href=\"\r\n],\r\n\"name\": [\r\n\"\"\r\n]\r\n},\r\n\"value\": \"\"\r\n}\r\n]\r\n},\r\n\"value\": \"\\n\\\" align=\\\"top\\\" width=\\\"16\\\" height=\\\"16\\\" alt=\\\"*\\\" />\\u00a0\\\" class=\\\"linktitle u-url space p-name\\\">IMG_6270_1\\n\\\">Nebenan. Freundliche Internet-Konferenz:\\nFoto: Amelie Nerger, @nergera CC-Lizenz BY-NC-SA\\n\"\r\n}\r\n]\r\n}\r\n},\r\n{\r\n\"type\": [\r\n\"h-card\"\r\n],\r\n\"properties\": {\r\n\"name\": [\r\n\"felix schwenzel\"\r\n],\r\n\"author\": [\r\n\"felix schwenzel\"\r\n],\r\n\"url\": [\r\n\"http://wirres.net/kontakt/\"\r\n],\r\n\"photo\": [\r\n\"http://root.wirres.net/03022687630_h2.jpg\"\r\n],\r\n\"note\": [\r\n\"wirres.net ist ein publizistisches angebot von felix schwenzel.\"\r\n],\r\n\"logo\": [\r\n\"http://wirres.net/images/dogpoo-original-114-transparent.png\"\r\n],\r\n\"nickname\": [\r\n\"ix\"\r\n]\r\n}\r\n}\r\n],\r\n...\r\n]\r\n}\r\nW Error: unhashable type: 'dict'\r\nTraceback (most recent call last):\r\n  File \"/base/data/home/apps/s~brid-gy/3.384978554043730343/publish.py\", line 195, in _run\r\nresult = self.attempt_single_item(item)\r\n  File \"/base/data/home/apps/s~brid-gy/3.384978554043730343/publish.py\", line 247, in attempt_single_item\r\nobj = microformats2.json_to_object(item)\r\n  File \"/base/data/home/apps/s~brid-gy/3.384978554043730343/activitystreams/microformats2.py\", line 259, in json_to_object\r\nfor field in ('like', 'like-of', 'repost', 'repost-of', 'in-reply-to')))\r\n  TypeError: unhashable type: 'dict'\r\n```"},"comment":{"url":"https://api.github.com/repos/snarfed/bridgy/issues/comments/114653232","html_url":"https://github.com/snarfed/bridgy/issues/419#issuecomment-114653232","issue_url":"https://api.github.com/repos/snarfed/bridgy/issues/419","id":114653232,"user":{"login":"kylewm","id":950127,"avatar_url":"https://avatars.githubusercontent.com/u/950127?v=3","gravatar_id":"","url":"https://api.github.com/users/kylewm","html_url":"https://github.com/kylewm","followers_url":"https://api.github.com/users/kylewm/followers","following_url":"https://api.github.com/users/kylewm/following{/other_user}","gists_url":"https://api.github.com/users/kylewm/gists{/gist_id}","starred_url":"https://api.github.com/users/kylewm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kylewm/subscriptions","organizations_url":"https://api.github.com/users/kylewm/orgs","repos_url":"https://api.github.com/users/kylewm/repos","events_url":"https://api.github.com/users/kylewm/events{/privacy}","received_events_url":"https://api.github.com/users/kylewm/received_events","type":"User","site_admin":false},"created_at":"2015-06-23T21:53:45Z","updated_at":"2015-06-23T21:53:45Z","body":"Aha, there's a subtle but important difference in aaronpk's markup. The properties he uses are nested:\r\n\r\n- h-entry\r\n  - p-repost-of h-cite\r\n    - p-author h-card\r\n      - u-url\r\n      - p-name\r\n\r\nso u-url and p-name are inside the h-card and are interpreted as properties *of* the h-card\r\n\r\nwhereas your post has (effectively)\r\n\r\n- h-entry\r\n  - p-repost-of h-cite\r\n    - p-author h-card\r\n    - u-url: https://www.flickr.com/photos/134213681@N05/\r\n    - p-name: Nebenan. Freundliche Internet-Konferenz\r\n\r\nbecause u-url and p-name are not inside the p-author h-card, they associate with their outer p-repost-of h-cite.\r\n\r\nAnd it's totally fine to have any and all of this inside the e-content. I actually like doing that way, so parsers that don't know about reposts, and only display the content will still display something sensical."}}