EXTERNAL: OSError: [Errno 48] Address already in use
On 06/29/18 08:05, T Berger wrote:
> On Friday, June 29, 2018 at 10:45:10 AM UTC-4, T Berger wrote:
>> On Thursday, June 28, 2018 at 1:21:32 AM UTC-4, T Berger wrote:
>>> Hi Guys,
>>> Thanks for all the suggestions. I found the problem. I had saved my program in IDLE and quit out of the shell, and then tried to run the program in Terminal. Previously, restarting the shell was enough to break the connection with the port. This time, I guess, it wasn't. So after thinking about your suggestions, I bypassed IDLE and went directly to Terminal, and the program worked.
>> I have to backtrack on my optimistic pronouncement. I know why I'm getting "address already in use" error messages, but I don't know how to avoid getting them. The problem is that I'm working with both IDLE and my Terminal at the same time. I have to close out of IDLE in some decisive way so that the connection with the port is cut. Otherwise I will get the error message. At first, just restarting the shell in IDLE worked. Then I actually had to close the app (which didn't seem like a flexible option to me). Now, even quitting out of IDLE doesn't work. So my revised question is: How do I work with both apps together so these error messages don't keep recurring?
> I'm using the flask test web address http://127.0.0.1:5000/ for both IDLE and Terminal.
That's not a "web address" - it's the address of your own machine. In
other words, you're connecting to yourself.? You can't use it
simultaneously for both applications - you'll need to change the port
number to something other than 5000 in one of them.