socket.error: [Errno 111] Connection refused

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

Traceback (most recent call last):

File "", line 10, in <module>


File "/home/Selfishbot/LIN3-TCR/LINETCR/", line 34, in login


File "/home/Selfishbot/LIN3-TCR/LINETCR/Api/", line 93, in qrLogin

qr = self.client.getAuthQrcode(True, "Bot")

File "/home/Selfishbot/LIN3-TCR/LINETCR/Api/../lib/curve/", line 9272, in getAuthQrcode

self.send_getAuthQrcode(keepLoggedIn, systemName)

File "/home/Selfishbot/LIN3-TCR/LINETCR/Api/../lib/curve/", line 9282, in send_getAuthQrcode


File "/home/Selfishbot/.virtualenvs/my-virtualenv/local/lib/python2.7/site-packages/thrift/transport/", line 107, in _f

result = f(*args, **kwargs)

File "/home/Selfishbot/.virtualenvs/my-virtualenv/local/lib/python2.7/site-packages/thrift/transport/", line 141, in flush


File "/usr/lib/python2.7/", line 1013, in endheaders


File "/usr/lib/python2.7/", line 864, in _send_output


File "/usr/lib/python2.7/", line 826, in send


File "/usr/lib/python2.7/", line 1216, in connect

self.timeout, self.source_address)

File "/usr/lib/python2.7/", line 571, in create_connection

raise err

socket.error: [Errno 111] Connection refused

HI there, free users have restricted Internet and need to go via our proxy server. we have some environment variables set so that most Http libraries (like "requests" for example) auto-detect the proxy and use it, but from that traceback it looks like your library isn't doing that...

if you have an option to configure a proxy you might be able to get it to work -- assuming the endpoint is on our whitelist. alternatively, paid accounts have unrestricted internet...

final suggestion -- if you're trying to run some code 24/7, see this page -- again, you'll need a paid account to get this working really.

Ok, my endpoint that is failing I believe would be The api for this endpoint is located at, which is included in the whitelist. is the endpoint used to allow a qr login through Can you please whitelist the endpoint which i need to login.

If you type in your browser you will see that it redirects you to, which is in the whitelist.

To clarify, we want to see api documentation in order to whitelist a site. (ie. something like an official line website that says, "hi, we welcome people accessing for example, you could post to with a message and it will do xyz")

Could you provide soemthing like that?