#๐Ÿ”’ error connection refused errors?"

35 messages ยท Page 1 of 1 (latest)

kind pumice
#

I am having an error using Flask applications. When I was using it on my work machine, it worked, but after transferring the files to another machine, the code gives a connection refused error.

daring sableBOT
#

@kind pumice

Python help channel opened

Remember to:

  • Ask your Python question, not if you can ask or if there's an expert who can help.
  • Show a code sample as text (rather than a screenshot) and the error message, if you've got one.
  • Explain what you expect to happen and what actually happens.

:warning: Do not pip install anything that isn't related to your question, especially if asked to over DMs.

kind pumice
#

error connection refused errors

grave basalt
#

!title Flask: error connection refused errors

daring sableBOT
#

Flask: error connection refused errors

grave basalt
#

Can you share the error?

#

!trace

daring sableBOT
#
Traceback

Please provide the full traceback for your exception in order to help us identify your issue.
While the last line of the error message tells us what kind of error you got,
the full traceback will tell us which line, and other critical information to solve your problem.
Please avoid screenshots so we can copy and paste parts of the message.

A full traceback could look like:

Traceback (most recent call last):
  File "my_file.py", line 5, in <module>
    add_three("6")
  File "my_file.py", line 2, in add_three
    a = num + 3
        ~~~~^~~
TypeError: can only concatenate str (not "int") to str

If the traceback is long, use our pastebin.

kind pumice
grave basalt
#

Does flask log anything?

#

Do you see anything in terminal?

#

If not, add some log messages to start with

kind pumice
grave basalt
#

What message do you see when running flask?

kind pumice
#

this message also appears on my job computer, but it works correctly

grave basalt
#

Is that from your local computer?

kind pumice
#

yes

grave basalt
#

And what URL are you trying to access? Your screenshot doesn't show it

kind pumice
#

the same

#

My local PC has the same files, everything is identical.

grave basalt
#

Try chrome or another browser? Curious if you have a firewall setting or anything interfering.

kind pumice
#

i tried in chrome but the same thing :(

#

I added the firewall rule to allow port 5000. It's in Portuguese; if you don't understand something, I can translate.

grave basalt
#

If flask and your browser running on same host?

kind pumice
#

host you say the computer right?

#

yes, running on same

grave basalt
#

Try running flask on another port? Maybe you have something else on 5000

turbid oriole
#

try running localhost only

#

what do you get?

daring sableBOT
#
Python help channel closed

This help channel has been closed and it's no longer possible to send messages here. If your question wasn't answered, feel free to create a new post in #1035199133436354600. To maximize your chances of getting a response, check out this guide on asking good questions.