I keep having issues with the port thing

I posted my flask app , it worked fine for some time, but then it stopped. keeps saying that the port is occupied by another process. i tried to change the port in the app , but still no avail. and i just paid for the pro version! so frustrating! thanks for any help!

Can you show a snippet of the code or the link to the code.

1 Like

this is what i have in my .py
if name == “main”:
app.run(debug=True, port=443)

but the console still shows debug mode is off and the port is 8080 . thank you

  • Serving Flask app ‘main’
  • Debug mode: off
    WARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead.
  • Running on all addresses (0.0.0.0)
  • Running on http://127.0.0.1:8080
  • Running on http://172.31.128.48:8080

Can you please send us the link to the repl?

https://replit.com/@SergeiH1/texttosql

Are you sure you didn’t accidentally delete it lol?


positive

it’s private though ,

Oh lol. Could you make it public just so I can look at it, please?

should i run on WSGI instead ?

i can’t figure out why it is not following port assignment per code , even though it should be available

It is probably running on 8080 because replit requires it and changes it for you.

i thought so too, but why does it then not follow the debug instruction?

there is a valuable openai api key :slight_smile:

What do you mean? I am pretty sure it does.

so um can you run it like this: app.run("0.0.0.0")?

  • Serving Flask app ‘main’
  • Debug mode: off
    WARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead.
  • Running on all addresses (0.0.0.0)
  • Running on http://127.0.0.1:8080
  • Running on http://172.31.128.48:8080

the same outcome , not a big deal since the app operates ok for now, after i killed all processes, but i just can’t figure out why does not it follow the instruction

1 Like

you are doing web.run (app) and then using the port again in app.run(...) so idk

2 Likes

Thank you, sir. sorry for the delay , they put me on quarantine as i just started. thank you, it fixed first after you pointed out. then started experiencing the same issue again (all ports are running some processes), whatever port i designate (and even if i don’t) . but i think i figured out where the problem was: the index.html was pointing not to to the URL but to the numbers address with a port number. I 've changed that and it seems to be working ok now.

2 Likes