Forums

HTTP Error on console

Hi,

Trying to run my script and im getting a connection error. Never got this on my laptop...

Failed to establish a new connection: [Errno 111 ] Connection refused',))

How do i fix this?

I think there might be some connection issues going on right now. My notebooks just started giving me bad gateway messages in the last 10 min or so.

ive been having intermittent connection problems on my laptop today as well.... thats why i was trying it out on pythonanywhere.... i wonder if there is something going on globally...

That's definitely a possibility. I just tried again, and the bad gateway message had turned to an authentication issue message. I'm back up and running after a pythonanywhere logout\login.

ive still got the HTTP error

These are different problems -- the notebook issue was a brief outage on one of our notebook servers -- sorry about that! We fixed it about ten minutes after it started.

The "Connection refused" error that @karim0028 is getting is because they are using a free account. Free accounts can only access sites that are on our whitelist, and need to use the proxy server that we provide to access them. Most Python HTTP libraries like requests and urllib3 will pick up the proxy settings from the system environment, so you don't need to do anything special to do that, but other libraries are not proxy-aware, so they will generate that error.

So: if the site that you're trying to access is on the whitelist, then I'd recommend that you use requests to access it -- it's a great library. If the site is not on the whitelist, we can add it if it is an officially-supported public API -- just send us a link to the API docs.

Hi,

I have a pretty similar problem. I am now a payed user, so that I can access sites that are not whitelisted. However when I try to access a not whitelisted domain, I get a connection refused error as well. I tried to access the site with selenium in the console and took a screenshot to see what happens, see below... How can i get access to this site? Do I have to change settings in my app? Thank you! enter image description here

Unfortunately that's a result of the version of Firefox that we have being out-of-date; it's not something we can fix quickly because newer versions of Firefox are incompatible with our virtualization system. We do have a plan to fix it, and it's going rapidly up the priority list, but we don't have a timeline right now.