{"action":"created","issue":{"url":"https://api.github.com/repos/marekjm/diaspy/issues/27","labels_url":"https://api.github.com/repos/marekjm/diaspy/issues/27/labels{/name}","comments_url":"https://api.github.com/repos/marekjm/diaspy/issues/27/comments","events_url":"https://api.github.com/repos/marekjm/diaspy/issues/27/events","html_url":"https://github.com/marekjm/diaspy/issues/27","id":109634936,"number":27,"title":"Can't post because of error in stream","user":{"login":"gjedeer","id":315648,"avatar_url":"https://avatars.githubusercontent.com/u/315648?v=3","gravatar_id":"","url":"https://api.github.com/users/gjedeer","html_url":"https://github.com/gjedeer","followers_url":"https://api.github.com/users/gjedeer/followers","following_url":"https://api.github.com/users/gjedeer/following{/other_user}","gists_url":"https://api.github.com/users/gjedeer/gists{/gist_id}","starred_url":"https://api.github.com/users/gjedeer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gjedeer/subscriptions","organizations_url":"https://api.github.com/users/gjedeer/orgs","repos_url":"https://api.github.com/users/gjedeer/repos","events_url":"https://api.github.com/users/gjedeer/events{/privacy}","received_events_url":"https://api.github.com/users/gjedeer/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/marekjm/diaspy/labels/bug","name":"bug","color":"fc2929"},{"url":"https://api.github.com/repos/marekjm/diaspy/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"open","locked":false,"assignee":{"login":"marekjm","id":2565699,"avatar_url":"https://avatars.githubusercontent.com/u/2565699?v=3","gravatar_id":"","url":"https://api.github.com/users/marekjm","html_url":"https://github.com/marekjm","followers_url":"https://api.github.com/users/marekjm/followers","following_url":"https://api.github.com/users/marekjm/following{/other_user}","gists_url":"https://api.github.com/users/marekjm/gists{/gist_id}","starred_url":"https://api.github.com/users/marekjm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marekjm/subscriptions","organizations_url":"https://api.github.com/users/marekjm/orgs","repos_url":"https://api.github.com/users/marekjm/repos","events_url":"https://api.github.com/users/marekjm/events{/privacy}","received_events_url":"https://api.github.com/users/marekjm/received_events","type":"User","site_admin":false},"milestone":null,"comments":4,"created_at":"2015-10-03T17:29:44Z","updated_at":"2015-12-19T08:33:14Z","closed_at":null,"body":"My code goes like this:\r\n\r\n```\r\n    c.login()\r\n    stream = diaspy.streams.Stream(c)\r\n    stream.post(markdown)\r\n\r\n```\r\n\r\nso I'm not really interested in contents of the stream. However, one of the posts in stream returns 404 and an exception is thrown, prohibiting me from posting.\r\n\r\n```\r\n    stream = diaspy.streams.Stream(c)\r\n  File \"/app/venv/src/diaspy/diaspy/streams.py\", line 34, in __init__\r\n    if fetch: self.fill()\r\n  File \"/app/venv/src/diaspy/diaspy/streams.py\", line 122, in fill\r\n    self._stream = self._obtain()\r\n  File \"/app/venv/src/diaspy/diaspy/streams.py\", line 66, in _obtain\r\n    return [Post(self._connection, guid=post['guid']) for post in request.json()]\r\n  File \"/app/venv/src/diaspy/diaspy/models.py\", line 337, in __init__\r\n    if fetch: self._fetchdata()\r\n  File \"/app/venv/src/diaspy/diaspy/models.py\", line 369, in _fetchdata\r\n    raise errors.PostError('{0}: could not fetch data for post: {1}'.format(request.status_code, id))\r\nPostError: 404: could not fetch data for post: 0d85510a4f24ad0df151caf1a3db579******@friendicared.de\r\n```\r\n\r\nI've worked around it like this, not sure it's an acceptable solution but it works for me:\r\n\r\n```\r\n--- streams.py  2015-10-03 19:28:43.364444537 +0200\r\n+++ /app/venv/src/diaspy/diaspy/streams.py       2015-10-03 19:23:33.932285274 +0200\r\n@@ -63,7 +63,12 @@\r\n         request = self._connection.get(self._location, params=params)\r\n         if request.status_code != 200:\r\n             raise errors.StreamError('wrong status code: {0}'.format(request.status_code))\r\n-        return [Post(self._connection, guid=post['guid']) for post in request.json()]\r\n+        posts = []\r\n+        for post in request.json():\r\n+            try:\r\n+                posts.append(Post(self._connection, guid=post['guid']))\r\n+            except errors.PostError:\r\n+                pass\r\n \r\n     def _expand(self, new_stream):\r\n         \"\"\"Appends older posts to stream.\r\n```"},"comment":{"url":"https://api.github.com/repos/marekjm/diaspy/issues/comments/165960843","html_url":"https://github.com/marekjm/diaspy/issues/27#issuecomment-165960843","issue_url":"https://api.github.com/repos/marekjm/diaspy/issues/27","id":165960843,"user":{"login":"marekjm","id":2565699,"avatar_url":"https://avatars.githubusercontent.com/u/2565699?v=3","gravatar_id":"","url":"https://api.github.com/users/marekjm","html_url":"https://github.com/marekjm","followers_url":"https://api.github.com/users/marekjm/followers","following_url":"https://api.github.com/users/marekjm/following{/other_user}","gists_url":"https://api.github.com/users/marekjm/gists{/gist_id}","starred_url":"https://api.github.com/users/marekjm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marekjm/subscriptions","organizations_url":"https://api.github.com/users/marekjm/orgs","repos_url":"https://api.github.com/users/marekjm/repos","events_url":"https://api.github.com/users/marekjm/events{/privacy}","received_events_url":"https://api.github.com/users/marekjm/received_events","type":"User","site_admin":false},"created_at":"2015-12-19T08:33:14Z","updated_at":"2015-12-19T08:33:14Z","body":"Should be fixed by a commit on devel branch. By default `PostError` exceptions are suppressed."}}