Hi I'm kind of new to python and completely new to pythonanywhere. I have a bot that logs into the app called LINE. I was simply trying to run the bot in another place besides my local machine. I have the bot working fine when I run it through local server, but my pc does not stay connected to net 24 hours a day. I was stuck for a while because the bot runs off of python 2.7 and I finally figured out how to change the virtualenv settings to python2.7. This also allowed me to finally get the version of thrift, rsa, and requests, which the bot uses. Now it seems like the bot is going to work when I run it through pythonanywhere but after a pause it throws an error like I'm being rejected. Please can someone tell me what I am doing wrong and how to fix the issue?
Error I am recieving: socket.error: [Errno 111] Connection refused
Entire error:
(my-virtualenv) 08:22 ~/LIN3-TCR (master)$ python STW.py
Traceback (most recent call last):
File "STW.py", line 10, in <module>
cl.login(qr=True)
File "/home/Selfishbot/LIN3-TCR/LINETCR/LineApi.py", line 34, in login
self.Talk.qrLogin(callback)
File "/home/Selfishbot/LIN3-TCR/LINETCR/Api/Talk.py", line 93, in qrLogin
qr = self.client.getAuthQrcode(True, "Bot")
File "/home/Selfishbot/LIN3-TCR/LINETCR/Api/../lib/curve/LineService.py", line 9272, in getAuthQrcode
self.send_getAuthQrcode(keepLoggedIn, systemName)
File "/home/Selfishbot/LIN3-TCR/LINETCR/Api/../lib/curve/LineService.py", line 9282, in send_getAuthQrcode
self._oprot.trans.flush()
File "/home/Selfishbot/.virtualenvs/my-virtualenv/local/lib/python2.7/site-packages/thrift/transport/THttpClient.py", line 107, in _f
result = f(*args, **kwargs)
File "/home/Selfishbot/.virtualenvs/my-virtualenv/local/lib/python2.7/site-packages/thrift/transport/THttpClient.py", line 141, in flush
self.__http.endheaders()
File "/usr/lib/python2.7/httplib.py", line 1013, in endheaders
self._send_output(message_body)
File "/usr/lib/python2.7/httplib.py", line 864, in _send_output
self.send(msg)
File "/usr/lib/python2.7/httplib.py", line 826, in send
self.connect()
File "/usr/lib/python2.7/httplib.py", line 1216, in connect
self.timeout, self.source_address)
File "/usr/lib/python2.7/socket.py", line 571, in create_connection
raise err
socket.error: [Errno 111] Connection refused