对等体为getstream.io python客户端重置连接

时间:2019-07-09 19:43:16

标签: python getstream-io

以下python代码返回'(Connection aborted.', ConnectionResetError(54, 'Connection reset by peer'))。我要做的就是在此人的时间轴上发布一些内容。

client = stream.connect(STREAM_API_KEY, STREAM_KEY_SECRET)

# For the feed group 'user' and user id get the feed
user_feed = client.feed('timeline', user_id)

try:
   # Add the activity to the feed
   user_feed.add_activity({'actor': user_id, 'verb': 'tweet', 'object': 1, 'tweet': 'Hello world'})
except Exception as e:
   print('Failed to add activity to stream for user_id: {}'.format(user_id))

0 个答案:

没有答案