ช่วยด้วยครับ python socket.error: [Errno 54] Connection reset by peer

ใช้ python ส่งข้อความทางไลน์ก่อนหน้านี้ส่งปกติครับ
แต่หลังๆมาทำไมมันขึ้น Error 54 ตลอดต้องมานั่งกดใหม่ตลอดครับ

Code ที่ใช้

#!/usr/bin/env python
#-*-/coding: utf-8 -*-

from line import LineClient, LineGroup, LineContact

try:
    client = LineClient("xxxx@hotmail.com", "xxxxx")
    #client = LineClient(authToken="AUTHTOKEN")
except:
    print "Login Failed"

authToken = client.authToken
print authToken,"\n"
print client.contacts,"\n"
for i in range(785, 5000):
      friend = client.contacts
      friend.sendImage("1.jpg")
      friend.sendImage("2.jpg")
      print friend,i,"\n"
       
   
else :
    print ('Send Finish')
   
Code ที่ขึ้น ErrorTraceback (most recent call last):
  File "/Users/thanabordee/Desktop/LINE-master1/LINE-master/examples/picOnly2.py", line 17, in <module>
    friend.sendImage("1.jpg")
  File "build/bdist.macosx-10.6-intel/egg/line/models.py", line 109, in sendImage
  File "build/bdist.macosx-10.6-intel/egg/line/client.py", line 27, in wrapper_check_auth
  File "build/bdist.macosx-10.6-intel/egg/line/client.py", line 453, in sendMessage
  File "build/bdist.macosx-10.6-intel/egg/line/api.py", line 323, in _sendMessage
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/curve/CurveThrift.py", line 1640, in sendMessage
    self.send_sendMessage(seq, message)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/curve/CurveThrift.py", line 1650, in send_sendMessage
    self._oprot.trans.flush()
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/thrift/transport/THttpClient.py", line 107, in _f
    result = f(*args, **kwargs)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/thrift/transport/THttpClient.py", line 147, in flush
    self.code, self.message, self.headers = self.__http.getreply()
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py", line 1211, in getreply
    response = self._conn.getresponse()
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py", line 1136, in getresponse
    response.begin()
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py", line 453, in begin
    version, status, reason = self._read_status()
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py", line 409, in _read_status
    line = self.fp.readline(_MAXLINE + 1)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/socket.py", line 480, in readline
    data = self._sock.recv(self._rbufsize)
socket.error: [Errno 54] Connection reset by peer
thanabordees-iMac:examples thanabordee$
thanabordees-iMac:examples thanabordee$

ช่วยหน่อยครับผม
แสดงความคิดเห็น
โปรดศึกษาและยอมรับนโยบายข้อมูลส่วนบุคคลก่อนเริ่มใช้งาน อ่านเพิ่มเติมได้ที่นี่