Python: Print Statements Aren't Working!

from flask import Flask, request, jsonify
from waitress import serve
import requests
import time
import threading

app = Flask(__name__)

# Main entry point
if __name__ == '__main__':
    print("Hello World")
    # threading.Thread(target=check_model_status).start()
    serve(app, host="0.0.0.0", port=8080)

"I'm running this simple code to generate Hello World, but it's not showing up in my logs...
Help?

Also, I'm using Dockerfile, don't know if it's related to all of this.."

Hey,

The initial discrepancy I spotted is that ā€œmainā€ should be replaced with ā€œnameā€ in your initialization code.

Itā€™s possible that the output of your print statements is being buffered, causing them to group multiple statements before theyā€™re displayed or written to a file. To address this, you might want to flush the output buffer manually. You can do this by adding the flush=True argument to your print function, like so: print("Your message", flush=True).

JƩrƩmy.
Render Support, UTC+3

1 Like

Thank you Jeremy for your support.

Iā€™ve changed my code to this

from flask import Flask, request, jsonify
from waitress import serve
import requests
import time
import threading

app = Flask(__name__)

# Main entry point
if __name__ == '__main__':
    print("Hello World", flush=True)
    # threading.Thread(target=check_model_status).start()
    serve(app, host="0.0.0.0", port=8080)

and also Iā€™ve cleaned the cache and deployed the new code.

Here are my logs:

Sep 21 02:19:12 PM  ==> Cloning from https://github.com/baiduvich/webhook_ai_headshot...
Sep 21 02:19:13 PM  ==> Checking out commit b3397824420bf0fbb23ee9acd3a06067dd29fafa in branch main
Sep 21 02:19:15 PM  ==> Downloading cache...
Sep 21 02:19:26 PM  #1 [internal] load .dockerignore
Sep 21 02:19:26 PM  #1 transferring context: 2B done
Sep 21 02:19:26 PM  #1 DONE 0.0s
Sep 21 02:19:26 PM  
Sep 21 02:19:26 PM  #2 [internal] load build definition from Dockerfile
Sep 21 02:19:26 PM  #2 transferring dockerfile: 567B done
Sep 21 02:19:26 PM  #2 DONE 0.0s
Sep 21 02:19:26 PM  
Sep 21 02:19:26 PM  #3 [internal] load metadata for docker.io/library/python:3.8-slim-buster
Sep 21 02:19:26 PM  #3 ...
Sep 21 02:19:26 PM  
Sep 21 02:19:26 PM  #4 [auth] library/python:pull token for registry-1.docker.io
Sep 21 02:19:26 PM  #4 DONE 0.0s
Sep 21 02:19:27 PM  
Sep 21 02:19:27 PM  #3 [internal] load metadata for docker.io/library/python:3.8-slim-buster
Sep 21 02:19:27 PM  #3 DONE 1.0s
Sep 21 02:19:27 PM  
Sep 21 02:19:27 PM  #5 [1/4] FROM docker.io/library/python:3.8-slim-buster@sha256:8799b0564103a9f36cfb8a8e1c562e11a9a6f2e3bb214e2adc23982b36a04511
Sep 21 02:19:27 PM  #5 resolve docker.io/library/python:3.8-slim-buster@sha256:8799b0564103a9f36cfb8a8e1c562e11a9a6f2e3bb214e2adc23982b36a04511 done
Sep 21 02:19:27 PM  #5 DONE 0.0s
Sep 21 02:19:27 PM  
Sep 21 02:19:27 PM  #6 importing cache manifest from local:15562198891600240212
Sep 21 02:19:27 PM  #6 DONE 0.0s
Sep 21 02:19:27 PM  
Sep 21 02:19:27 PM  #7 [internal] load build context
Sep 21 02:19:27 PM  #7 transferring context: 2.33kB done
Sep 21 02:19:27 PM  #7 DONE 0.0s
Sep 21 02:19:27 PM  
Sep 21 02:19:27 PM  #8 [2/4] WORKDIR /app
Sep 21 02:19:27 PM  #8 CACHED
Sep 21 02:19:27 PM  
Sep 21 02:19:27 PM  #9 [3/4] COPY . /app
Sep 21 02:19:27 PM  #9 CACHED
Sep 21 02:19:27 PM  
Sep 21 02:19:27 PM  #10 [4/4] RUN pip install --no-cache-dir -r requirements.txt
Sep 21 02:19:27 PM  #10 sha256:8b91b88d557765cd8c6802668755a3f6dc4337b6ce15a17e4857139e5fc964f3 8.39MB / 27.14MB 0.2s
Sep 21 02:19:28 PM  #10 sha256:8b91b88d557765cd8c6802668755a3f6dc4337b6ce15a17e4857139e5fc964f3 17.83MB / 27.14MB 0.3s
Sep 21 02:19:28 PM  #10 sha256:8b91b88d557765cd8c6802668755a3f6dc4337b6ce15a17e4857139e5fc964f3 27.14MB / 27.14MB 0.5s done
Sep 21 02:19:28 PM  #10 extracting sha256:8b91b88d557765cd8c6802668755a3f6dc4337b6ce15a17e4857139e5fc964f3
Sep 21 02:19:29 PM  #10 extracting sha256:8b91b88d557765cd8c6802668755a3f6dc4337b6ce15a17e4857139e5fc964f3 1.2s done
Sep 21 02:19:29 PM  #10 sha256:824416e234237961c9c5d4f41dfe5b295a3c35a671ee52889bfb08d8e257ec4c 2.78MB / 2.78MB 0.0s done
Sep 21 02:19:29 PM  #10 extracting sha256:824416e234237961c9c5d4f41dfe5b295a3c35a671ee52889bfb08d8e257ec4c
Sep 21 02:19:29 PM  #10 extracting sha256:824416e234237961c9c5d4f41dfe5b295a3c35a671ee52889bfb08d8e257ec4c 0.2s done
Sep 21 02:19:29 PM  #10 sha256:8f777578c172d018077d3dc22d6654911fff60066097943fe8c4697ecf8aac35 12.89MB / 12.89MB 0.3s done
Sep 21 02:19:30 PM  #10 extracting sha256:8f777578c172d018077d3dc22d6654911fff60066097943fe8c4697ecf8aac35
Sep 21 02:19:30 PM  #10 extracting sha256:8f777578c172d018077d3dc22d6654911fff60066097943fe8c4697ecf8aac35 0.5s done
Sep 21 02:19:30 PM  #10 sha256:cbfea27109a8b1136059a7973ccb8243889faf162ebc173a05909dcb0bec03c9 244B / 244B done
Sep 21 02:19:30 PM  #10 extracting sha256:cbfea27109a8b1136059a7973ccb8243889faf162ebc173a05909dcb0bec03c9 done
Sep 21 02:19:30 PM  #10 sha256:276dfcf5deffff3c5d540a8e0d9a18656a4c03637a8b4f4eec1f4a147799c901 3.14MB / 3.14MB 0.0s done
Sep 21 02:19:30 PM  #10 extracting sha256:276dfcf5deffff3c5d540a8e0d9a18656a4c03637a8b4f4eec1f4a147799c901
Sep 21 02:19:30 PM  #10 extracting sha256:276dfcf5deffff3c5d540a8e0d9a18656a4c03637a8b4f4eec1f4a147799c901 0.3s done
Sep 21 02:19:30 PM  #10 sha256:cba97a1287791443b603e572e1ec3ea1f3f43ef2210f6247db413016a1eb213a 97B / 97B done
Sep 21 02:19:30 PM  #10 extracting sha256:cba97a1287791443b603e572e1ec3ea1f3f43ef2210f6247db413016a1eb213a done
Sep 21 02:19:30 PM  #10 sha256:9f60671f575971b932e6007747d59be7607ca9fec08904d03e01f1880f035e75 1.27kB / 1.27kB done
Sep 21 02:19:30 PM  #10 extracting sha256:9f60671f575971b932e6007747d59be7607ca9fec08904d03e01f1880f035e75 0.0s done
Sep 21 02:19:30 PM  #10 sha256:c620bcf6f47dd7a08fce556de4f140d4e268ede0ae1d4fe9fea5ea8831b78200 4.60MB / 4.60MB 0.1s done
Sep 21 02:19:30 PM  #10 extracting sha256:c620bcf6f47dd7a08fce556de4f140d4e268ede0ae1d4fe9fea5ea8831b78200
Sep 21 02:19:31 PM  #10 extracting sha256:c620bcf6f47dd7a08fce556de4f140d4e268ede0ae1d4fe9fea5ea8831b78200 0.4s done
Sep 21 02:19:31 PM  #10 CACHED
Sep 21 02:19:31 PM  
Sep 21 02:19:31 PM  #11 exporting to docker image format
Sep 21 02:19:31 PM  #11 exporting layers done
Sep 21 02:19:31 PM  #11 exporting manifest sha256:b5a4247521dcc5f3efde465518afb64c51c76d02c9e9d62c0214bec36d48a889 done
Sep 21 02:19:31 PM  #11 exporting config sha256:b7b3891a706e464942eeee3b70cd32184e592d85abc1009a60d803f7584ae8c0 done
Sep 21 02:19:32 PM  #11 DONE 1.5s
Sep 21 02:19:32 PM  
Sep 21 02:19:32 PM  #12 exporting content cache
Sep 21 02:19:32 PM  #12 DONE 0.0s
Sep 21 02:19:33 PM  Pushing image to registry...
Sep 21 02:19:25 PM  ==> Transferred 58MB in 8s. Extraction took 0s.
Sep 21 02:19:34 PM  Upload succeeded
Sep 21 02:19:34 PM  DONE
Sep 21 02:19:36 PM  ==> Deploying...
Sep 21 02:19:42 PM  INFO:waitress:Serving on http://0.0.0.0:8080
Sep 21 02:19:47 PM  Your service is live šŸŽ‰
Sep 21 02:19:53 PM  ==> Detected service running on port 8080
Sep 21 02:19:53 PM  ==> Docs on specifying a port: https://render.com/docs/web-services#port-detection

As you can see no Hello World. I donā€™t know whatā€™s the mistake Iā€™m makingā€¦

Hereā€™s the new code

from flask import Flask, request, jsonify
from waitress import serve
import requests
import time
import threading

app = Flask(__name__)

# Main entry point
if __name__ == '__main__':
    print("Hello World", flush=True)
    # threading.Thread(target=check_model_status).start()
    serve(app, host="0.0.0.0", port=8080)

And here are the logs

Sep 21 02:19:12 PM  ==> Cloning from https://github.com/baiduvich/webhook_ai_headshot...
Sep 21 02:19:13 PM  ==> Checking out commit b3397824420bf0fbb23ee9acd3a06067dd29fafa in branch main
Sep 21 02:19:15 PM  ==> Downloading cache...
Sep 21 02:19:26 PM  #1 [internal] load .dockerignore
Sep 21 02:19:26 PM  #1 transferring context: 2B done
Sep 21 02:19:26 PM  #1 DONE 0.0s
Sep 21 02:19:26 PM  
Sep 21 02:19:26 PM  #2 [internal] load build definition from Dockerfile
Sep 21 02:19:26 PM  #2 transferring dockerfile: 567B done
Sep 21 02:19:26 PM  #2 DONE 0.0s
Sep 21 02:19:26 PM  
Sep 21 02:19:26 PM  #3 [internal] load metadata for docker.io/library/python:3.8-slim-buster
Sep 21 02:19:26 PM  #3 ...
Sep 21 02:19:26 PM  
Sep 21 02:19:26 PM  #4 [auth] library/python:pull token for registry-1.docker.io
Sep 21 02:19:26 PM  #4 DONE 0.0s
Sep 21 02:19:27 PM  
Sep 21 02:19:27 PM  #3 [internal] load metadata for docker.io/library/python:3.8-slim-buster
Sep 21 02:19:27 PM  #3 DONE 1.0s
Sep 21 02:19:27 PM  
Sep 21 02:19:27 PM  #5 [1/4] FROM docker.io/library/python:3.8-slim-buster@sha256:8799b0564103a9f36cfb8a8e1c562e11a9a6f2e3bb214e2adc23982b36a04511
Sep 21 02:19:27 PM  #5 resolve docker.io/library/python:3.8-slim-buster@sha256:8799b0564103a9f36cfb8a8e1c562e11a9a6f2e3bb214e2adc23982b36a04511 done
Sep 21 02:19:27 PM  #5 DONE 0.0s
Sep 21 02:19:27 PM  
Sep 21 02:19:27 PM  #6 importing cache manifest from local:15562198891600240212
Sep 21 02:19:27 PM  #6 DONE 0.0s
Sep 21 02:19:27 PM  
Sep 21 02:19:27 PM  #7 [internal] load build context
Sep 21 02:19:27 PM  #7 transferring context: 2.33kB done
Sep 21 02:19:27 PM  #7 DONE 0.0s
Sep 21 02:19:27 PM  
Sep 21 02:19:27 PM  #8 [2/4] WORKDIR /app
Sep 21 02:19:27 PM  #8 CACHED
Sep 21 02:19:27 PM  
Sep 21 02:19:27 PM  #9 [3/4] COPY . /app
Sep 21 02:19:27 PM  #9 CACHED
Sep 21 02:19:27 PM  
Sep 21 02:19:27 PM  #10 [4/4] RUN pip install --no-cache-dir -r requirements.txt
Sep 21 02:19:27 PM  #10 sha256:8b91b88d557765cd8c6802668755a3f6dc4337b6ce15a17e4857139e5fc964f3 8.39MB / 27.14MB 0.2s
Sep 21 02:19:28 PM  #10 sha256:8b91b88d557765cd8c6802668755a3f6dc4337b6ce15a17e4857139e5fc964f3 17.83MB / 27.14MB 0.3s
Sep 21 02:19:28 PM  #10 sha256:8b91b88d557765cd8c6802668755a3f6dc4337b6ce15a17e4857139e5fc964f3 27.14MB / 27.14MB 0.5s done
Sep 21 02:19:28 PM  #10 extracting sha256:8b91b88d557765cd8c6802668755a3f6dc4337b6ce15a17e4857139e5fc964f3
Sep 21 02:19:29 PM  #10 extracting sha256:8b91b88d557765cd8c6802668755a3f6dc4337b6ce15a17e4857139e5fc964f3 1.2s done
Sep 21 02:19:29 PM  #10 sha256:824416e234237961c9c5d4f41dfe5b295a3c35a671ee52889bfb08d8e257ec4c 2.78MB / 2.78MB 0.0s done
Sep 21 02:19:29 PM  #10 extracting sha256:824416e234237961c9c5d4f41dfe5b295a3c35a671ee52889bfb08d8e257ec4c
Sep 21 02:19:29 PM  #10 extracting sha256:824416e234237961c9c5d4f41dfe5b295a3c35a671ee52889bfb08d8e257ec4c 0.2s done
Sep 21 02:19:29 PM  #10 sha256:8f777578c172d018077d3dc22d6654911fff60066097943fe8c4697ecf8aac35 12.89MB / 12.89MB 0.3s done
Sep 21 02:19:30 PM  #10 extracting sha256:8f777578c172d018077d3dc22d6654911fff60066097943fe8c4697ecf8aac35
Sep 21 02:19:30 PM  #10 extracting sha256:8f777578c172d018077d3dc22d6654911fff60066097943fe8c4697ecf8aac35 0.5s done
Sep 21 02:19:30 PM  #10 sha256:cbfea27109a8b1136059a7973ccb8243889faf162ebc173a05909dcb0bec03c9 244B / 244B done
Sep 21 02:19:30 PM  #10 extracting sha256:cbfea27109a8b1136059a7973ccb8243889faf162ebc173a05909dcb0bec03c9 done
Sep 21 02:19:30 PM  #10 sha256:276dfcf5deffff3c5d540a8e0d9a18656a4c03637a8b4f4eec1f4a147799c901 3.14MB / 3.14MB 0.0s done
Sep 21 02:19:30 PM  #10 extracting sha256:276dfcf5deffff3c5d540a8e0d9a18656a4c03637a8b4f4eec1f4a147799c901
Sep 21 02:19:30 PM  #10 extracting sha256:276dfcf5deffff3c5d540a8e0d9a18656a4c03637a8b4f4eec1f4a147799c901 0.3s done
Sep 21 02:19:30 PM  #10 sha256:cba97a1287791443b603e572e1ec3ea1f3f43ef2210f6247db413016a1eb213a 97B / 97B done
Sep 21 02:19:30 PM  #10 extracting sha256:cba97a1287791443b603e572e1ec3ea1f3f43ef2210f6247db413016a1eb213a done
Sep 21 02:19:30 PM  #10 sha256:9f60671f575971b932e6007747d59be7607ca9fec08904d03e01f1880f035e75 1.27kB / 1.27kB done
Sep 21 02:19:30 PM  #10 extracting sha256:9f60671f575971b932e6007747d59be7607ca9fec08904d03e01f1880f035e75 0.0s done
Sep 21 02:19:30 PM  #10 sha256:c620bcf6f47dd7a08fce556de4f140d4e268ede0ae1d4fe9fea5ea8831b78200 4.60MB / 4.60MB 0.1s done
Sep 21 02:19:30 PM  #10 extracting sha256:c620bcf6f47dd7a08fce556de4f140d4e268ede0ae1d4fe9fea5ea8831b78200
Sep 21 02:19:31 PM  #10 extracting sha256:c620bcf6f47dd7a08fce556de4f140d4e268ede0ae1d4fe9fea5ea8831b78200 0.4s done
Sep 21 02:19:31 PM  #10 CACHED
Sep 21 02:19:31 PM  
Sep 21 02:19:31 PM  #11 exporting to docker image format
Sep 21 02:19:31 PM  #11 exporting layers done
Sep 21 02:19:31 PM  #11 exporting manifest sha256:b5a4247521dcc5f3efde465518afb64c51c76d02c9e9d62c0214bec36d48a889 done
Sep 21 02:19:31 PM  #11 exporting config sha256:b7b3891a706e464942eeee3b70cd32184e592d85abc1009a60d803f7584ae8c0 done
Sep 21 02:19:32 PM  #11 DONE 1.5s
Sep 21 02:19:32 PM  
Sep 21 02:19:32 PM  #12 exporting content cache
Sep 21 02:19:32 PM  #12 DONE 0.0s
Sep 21 02:19:33 PM  Pushing image to registry...
Sep 21 02:19:25 PM  ==> Transferred 58MB in 8s. Extraction took 0s.
Sep 21 02:19:34 PM  Upload succeeded
Sep 21 02:19:34 PM  DONE
Sep 21 02:19:36 PM  ==> Deploying...
Sep 21 02:19:42 PM  INFO:waitress:Serving on http://0.0.0.0:8080
Sep 21 02:19:47 PM  Your service is live šŸŽ‰
Sep 21 02:19:53 PM  ==> Detected service running on port 8080
Sep 21 02:19:53 PM  ==> Docs on specifying a port: https://render.com/docs/web-services#port-detection
Sep 21 02:19:34 PM  Upload succeeded
Sep 21 02:19:34 PM  DONE
Sep 21 02:19:34 PM  Upload succeeded
Sep 21 02:19:34 PM  DONE

As you can see no printing of Hello World, I donā€™t know whatā€™s the mistake Iā€™m makingā€¦

Iā€™ve changed the code, added flush=True, but still no printing of the message.

Hereā€™s my code:

from flask import Flask, request, jsonify
from waitress import serve
import requests
import time
import threading

app = Flask(__name__)

# Main entry point
if __name__ == '__name__':
    print("Hello World", flush=True)
    # threading.Thread(target=check_model_status).start()
    serve(app, host="0.0.0.0", port=8080)

And here are the logs:

Sep 21 02:19:12 PM  ==> Cloning from https://github.com/baiduvich/webhook_ai_headshot...
Sep 21 02:19:13 PM  ==> Checking out commit b3397824420bf0fbb23ee9acd3a06067dd29fafa in branch main
Sep 21 02:19:15 PM  ==> Downloading cache...
Sep 21 02:19:26 PM  #1 [internal] load .dockerignore
Sep 21 02:19:26 PM  #1 transferring context: 2B done
Sep 21 02:19:26 PM  #1 DONE 0.0s
Sep 21 02:19:26 PM  
Sep 21 02:19:26 PM  #2 [internal] load build definition from Dockerfile
Sep 21 02:19:26 PM  #2 transferring dockerfile: 567B done
Sep 21 02:19:26 PM  #2 DONE 0.0s
Sep 21 02:19:26 PM  
Sep 21 02:19:26 PM  #3 [internal] load metadata for docker.io/library/python:3.8-slim-buster
Sep 21 02:19:26 PM  #3 ...
Sep 21 02:19:26 PM  
Sep 21 02:19:26 PM  #4 [auth] library/python:pull token for registry-1.docker.io
Sep 21 02:19:26 PM  #4 DONE 0.0s
Sep 21 02:19:27 PM  
Sep 21 02:19:27 PM  #3 [internal] load metadata for docker.io/library/python:3.8-slim-buster
Sep 21 02:19:27 PM  #3 DONE 1.0s
Sep 21 02:19:27 PM  
Sep 21 02:19:27 PM  #5 [1/4] FROM docker.io/library/python:3.8-slim-buster@sha256:8799b0564103a9f36cfb8a8e1c562e11a9a6f2e3bb214e2adc23982b36a04511
Sep 21 02:19:27 PM  #5 resolve docker.io/library/python:3.8-slim-buster@sha256:8799b0564103a9f36cfb8a8e1c562e11a9a6f2e3bb214e2adc23982b36a04511 done
Sep 21 02:19:27 PM  #5 DONE 0.0s
Sep 21 02:19:27 PM  
Sep 21 02:19:27 PM  #6 importing cache manifest from local:15562198891600240212
Sep 21 02:19:27 PM  #6 DONE 0.0s
Sep 21 02:19:27 PM  
Sep 21 02:19:27 PM  #7 [internal] load build context
Sep 21 02:19:27 PM  #7 transferring context: 2.33kB done
Sep 21 02:19:27 PM  #7 DONE 0.0s
Sep 21 02:19:27 PM  
Sep 21 02:19:27 PM  #8 [2/4] WORKDIR /app
Sep 21 02:19:27 PM  #8 CACHED
Sep 21 02:19:27 PM  
Sep 21 02:19:27 PM  #9 [3/4] COPY . /app
Sep 21 02:19:27 PM  #9 CACHED
Sep 21 02:19:27 PM  
Sep 21 02:19:27 PM  #10 [4/4] RUN pip install --no-cache-dir -r requirements.txt
Sep 21 02:19:27 PM  #10 sha256:8b91b88d557765cd8c6802668755a3f6dc4337b6ce15a17e4857139e5fc964f3 8.39MB / 27.14MB 0.2s
Sep 21 02:19:28 PM  #10 sha256:8b91b88d557765cd8c6802668755a3f6dc4337b6ce15a17e4857139e5fc964f3 17.83MB / 27.14MB 0.3s
Sep 21 02:19:28 PM  #10 sha256:8b91b88d557765cd8c6802668755a3f6dc4337b6ce15a17e4857139e5fc964f3 27.14MB / 27.14MB 0.5s done
Sep 21 02:19:28 PM  #10 extracting sha256:8b91b88d557765cd8c6802668755a3f6dc4337b6ce15a17e4857139e5fc964f3
Sep 21 02:19:29 PM  #10 extracting sha256:8b91b88d557765cd8c6802668755a3f6dc4337b6ce15a17e4857139e5fc964f3 1.2s done
Sep 21 02:19:29 PM  #10 sha256:824416e234237961c9c5d4f41dfe5b295a3c35a671ee52889bfb08d8e257ec4c 2.78MB / 2.78MB 0.0s done
Sep 21 02:19:29 PM  #10 extracting sha256:824416e234237961c9c5d4f41dfe5b295a3c35a671ee52889bfb08d8e257ec4c
Sep 21 02:19:29 PM  #10 extracting sha256:824416e234237961c9c5d4f41dfe5b295a3c35a671ee52889bfb08d8e257ec4c 0.2s done
Sep 21 02:19:29 PM  #10 sha256:8f777578c172d018077d3dc22d6654911fff60066097943fe8c4697ecf8aac35 12.89MB / 12.89MB 0.3s done
Sep 21 02:19:30 PM  #10 extracting sha256:8f777578c172d018077d3dc22d6654911fff60066097943fe8c4697ecf8aac35
Sep 21 02:19:30 PM  #10 extracting sha256:8f777578c172d018077d3dc22d6654911fff60066097943fe8c4697ecf8aac35 0.5s done
Sep 21 02:19:30 PM  #10 sha256:cbfea27109a8b1136059a7973ccb8243889faf162ebc173a05909dcb0bec03c9 244B / 244B done
Sep 21 02:19:30 PM  #10 extracting sha256:cbfea27109a8b1136059a7973ccb8243889faf162ebc173a05909dcb0bec03c9 done
Sep 21 02:19:30 PM  #10 sha256:276dfcf5deffff3c5d540a8e0d9a18656a4c03637a8b4f4eec1f4a147799c901 3.14MB / 3.14MB 0.0s done
Sep 21 02:19:30 PM  #10 extracting sha256:276dfcf5deffff3c5d540a8e0d9a18656a4c03637a8b4f4eec1f4a147799c901
Sep 21 02:19:30 PM  #10 extracting sha256:276dfcf5deffff3c5d540a8e0d9a18656a4c03637a8b4f4eec1f4a147799c901 0.3s done
Sep 21 02:19:30 PM  #10 sha256:cba97a1287791443b603e572e1ec3ea1f3f43ef2210f6247db413016a1eb213a 97B / 97B done
Sep 21 02:19:30 PM  #10 extracting sha256:cba97a1287791443b603e572e1ec3ea1f3f43ef2210f6247db413016a1eb213a done
Sep 21 02:19:30 PM  #10 sha256:9f60671f575971b932e6007747d59be7607ca9fec08904d03e01f1880f035e75 1.27kB / 1.27kB done
Sep 21 02:19:30 PM  #10 extracting sha256:9f60671f575971b932e6007747d59be7607ca9fec08904d03e01f1880f035e75 0.0s done
Sep 21 02:19:30 PM  #10 sha256:c620bcf6f47dd7a08fce556de4f140d4e268ede0ae1d4fe9fea5ea8831b78200 4.60MB / 4.60MB 0.1s done
Sep 21 02:19:30 PM  #10 extracting sha256:c620bcf6f47dd7a08fce556de4f140d4e268ede0ae1d4fe9fea5ea8831b78200
Sep 21 02:19:31 PM  #10 extracting sha256:c620bcf6f47dd7a08fce556de4f140d4e268ede0ae1d4fe9fea5ea8831b78200 0.4s done
Sep 21 02:19:31 PM  #10 CACHED
Sep 21 02:19:31 PM  
Sep 21 02:19:31 PM  #11 exporting to docker image format
Sep 21 02:19:31 PM  #11 exporting layers done
Sep 21 02:19:31 PM  #11 exporting manifest sha256:b5a4247521dcc5f3efde465518afb64c51c76d02c9e9d62c0214bec36d48a889 done
Sep 21 02:19:31 PM  #11 exporting config sha256:b7b3891a706e464942eeee3b70cd32184e592d85abc1009a60d803f7584ae8c0 done
Sep 21 02:19:32 PM  #11 DONE 1.5s
Sep 21 02:19:32 PM  
Sep 21 02:19:32 PM  #12 exporting content cache
Sep 21 02:19:32 PM  #12 DONE 0.0s
Sep 21 02:19:33 PM  Pushing image to registry...
Sep 21 02:19:25 PM  ==> Transferred 58MB in 8s. Extraction took 0s.
Sep 21 02:19:34 PM  Upload succeeded
Sep 21 02:19:34 PM  DONE
Sep 21 02:19:36 PM  ==> Deploying...
Sep 21 02:19:42 PM  INFO:waitress:Serving on http://0.0.0.0:8080
Sep 21 02:19:47 PM  Your service is live šŸŽ‰
Sep 21 02:19:53 PM  ==> Detected service running on port 8080
Sep 21 02:19:53 PM  ==> Docs on specifying a port: https://render.com/docs/web-services#port-detection
Sep 21 02:19:34 PM  Upload succeeded
Sep 21 02:19:34 PM  DONE
Sep 21 02:19:34 PM  Upload succeeded
Sep 21 02:19:34 PM  DONE

Sep 21 02:19:12 PM  ==> Cloning from https://github.com/baiduvich/webhook_ai_headshot...
Sep 21 02:19:13 PM  ==> Checking out commit b3397824420bf0fbb23ee9acd3a06067dd29fafa in branch main
Sep 21 02:19:15 PM  ==> Downloading cache...
Sep 21 02:19:26 PM  #1 [internal] load .dockerignore
Sep 21 02:19:26 PM  #1 transferring context: 2B done
Sep 21 02:19:26 PM  #1 DONE 0.0s
Sep 21 02:19:26 PM  
Sep 21 02:19:26 PM  #2 [internal] load build definition from Dockerfile
Sep 21 02:19:26 PM  #2 transferring dockerfile: 567B done
Sep 21 02:19:26 PM  #2 DONE 0.0s
Sep 21 02:19:26 PM  
Sep 21 02:19:26 PM  #3 [internal] load metadata for docker.io/library/python:3.8-slim-buster
Sep 21 02:19:26 PM  #3 ...
Sep 21 02:19:26 PM  
Sep 21 02:19:26 PM  #4 [auth] library/python:pull token for registry-1.docker.io
Sep 21 02:19:26 PM  #4 DONE 0.0s
Sep 21 02:19:27 PM  
Sep 21 02:19:27 PM  #3 [internal] load metadata for docker.io/library/python:3.8-slim-buster
Sep 21 02:19:27 PM  #3 DONE 1.0s
Sep 21 02:19:27 PM  
Sep 21 02:19:27 PM  #5 [1/4] FROM docker.io/library/python:3.8-slim-buster@sha256:8799b0564103a9f36cfb8a8e1c562e11a9a6f2e3bb214e2adc23982b36a04511
Sep 21 02:19:27 PM  #5 resolve docker.io/library/python:3.8-slim-buster@sha256:8799b0564103a9f36cfb8a8e1c562e11a9a6f2e3bb214e2adc23982b36a04511 done
Sep 21 02:19:27 PM  #5 DONE 0.0s
Sep 21 02:19:27 PM  
Sep 21 02:19:27 PM  #6 importing cache manifest from local:15562198891600240212
Sep 21 02:19:27 PM  #6 DONE 0.0s
Sep 21 02:19:27 PM  
Sep 21 02:19:27 PM  #7 [internal] load build context
Sep 21 02:19:27 PM  #7 transferring context: 2.33kB done
Sep 21 02:19:27 PM  #7 DONE 0.0s
Sep 21 02:19:27 PM  
Sep 21 02:19:27 PM  #8 [2/4] WORKDIR /app
Sep 21 02:19:27 PM  #8 CACHED
Sep 21 02:19:27 PM  
Sep 21 02:19:27 PM  #9 [3/4] COPY . /app
Sep 21 02:19:27 PM  #9 CACHED
Sep 21 02:19:27 PM  
Sep 21 02:19:27 PM  #10 [4/4] RUN pip install --no-cache-dir -r requirements.txt
Sep 21 02:19:27 PM  #10 sha256:8b91b88d557765cd8c6802668755a3f6dc4337b6ce15a17e4857139e5fc964f3 8.39MB / 27.14MB 0.2s
Sep 21 02:19:28 PM  #10 sha256:8b91b88d557765cd8c6802668755a3f6dc4337b6ce15a17e4857139e5fc964f3 17.83MB / 27.14MB 0.3s
Sep 21 02:19:28 PM  #10 sha256:8b91b88d557765cd8c6802668755a3f6dc4337b6ce15a17e4857139e5fc964f3 27.14MB / 27.14MB 0.5s done
Sep 21 02:19:28 PM  #10 extracting sha256:8b91b88d557765cd8c6802668755a3f6dc4337b6ce15a17e4857139e5fc964f3
Sep 21 02:19:29 PM  #10 extracting sha256:8b91b88d557765cd8c6802668755a3f6dc4337b6ce15a17e4857139e5fc964f3 1.2s done
Sep 21 02:19:29 PM  #10 sha256:824416e234237961c9c5d4f41dfe5b295a3c35a671ee52889bfb08d8e257ec4c 2.78MB / 2.78MB 0.0s done
Sep 21 02:19:29 PM  #10 extracting sha256:824416e234237961c9c5d4f41dfe5b295a3c35a671ee52889bfb08d8e257ec4c
Sep 21 02:19:29 PM  #10 extracting sha256:824416e234237961c9c5d4f41dfe5b295a3c35a671ee52889bfb08d8e257ec4c 0.2s done
Sep 21 02:19:29 PM  #10 sha256:8f777578c172d018077d3dc22d6654911fff60066097943fe8c4697ecf8aac35 12.89MB / 12.89MB 0.3s done
Sep 21 02:19:30 PM  #10 extracting sha256:8f777578c172d018077d3dc22d6654911fff60066097943fe8c4697ecf8aac35
Sep 21 02:19:30 PM  #10 extracting sha256:8f777578c172d018077d3dc22d6654911fff60066097943fe8c4697ecf8aac35 0.5s done
Sep 21 02:19:30 PM  #10 sha256:cbfea27109a8b1136059a7973ccb8243889faf162ebc173a05909dcb0bec03c9 244B / 244B done
Sep 21 02:19:30 PM  #10 extracting sha256:cbfea27109a8b1136059a7973ccb8243889faf162ebc173a05909dcb0bec03c9 done
Sep 21 02:19:30 PM  #10 sha256:276dfcf5deffff3c5d540a8e0d9a18656a4c03637a8b4f4eec1f4a147799c901 3.14MB / 3.14MB 0.0s done
Sep 21 02:19:30 PM  #10 extracting sha256:276dfcf5deffff3c5d540a8e0d9a18656a4c03637a8b4f4eec1f4a147799c901
Sep 21 02:19:30 PM  #10 extracting sha256:276dfcf5deffff3c5d540a8e0d9a18656a4c03637a8b4f4eec1f4a147799c901 0.3s done
Sep 21 02:19:30 PM  #10 sha256:cba97a1287791443b603e572e1ec3ea1f3f43ef2210f6247db413016a1eb213a 97B / 97B done
Sep 21 02:19:30 PM  #10 extracting sha256:cba97a1287791443b603e572e1ec3ea1f3f43ef2210f6247db413016a1eb213a done
Sep 21 02:19:30 PM  #10 sha256:9f60671f575971b932e6007747d59be7607ca9fec08904d03e01f1880f035e75 1.27kB / 1.27kB done
Sep 21 02:19:30 PM  #10 extracting sha256:9f60671f575971b932e6007747d59be7607ca9fec08904d03e01f1880f035e75 0.0s done
Sep 21 02:19:30 PM  #10 sha256:c620bcf6f47dd7a08fce556de4f140d4e268ede0ae1d4fe9fea5ea8831b78200 4.60MB / 4.60MB 0.1s done
Sep 21 02:19:30 PM  #10 extracting sha256:c620bcf6f47dd7a08fce556de4f140d4e268ede0ae1d4fe9fea5ea8831b78200
Sep 21 02:19:31 PM  #10 extracting sha256:c620bcf6f47dd7a08fce556de4f140d4e268ede0ae1d4fe9fea5ea8831b78200 0.4s done
Sep 21 02:19:31 PM  #10 CACHED
Sep 21 02:19:31 PM  
Sep 21 02:19:31 PM  #11 exporting to docker image format
Sep 21 02:19:31 PM  #11 exporting layers done
Sep 21 02:19:31 PM  #11 exporting manifest sha256:b5a4247521dcc5f3efde465518afb64c51c76d02c9e9d62c0214bec36d48a889 done
Sep 21 02:19:31 PM  #11 exporting config sha256:b7b3891a706e464942eeee3b70cd32184e592d85abc1009a60d803f7584ae8c0 done
Sep 21 02:19:32 PM  #11 DONE 1.5s
Sep 21 02:19:32 PM  
Sep 21 02:19:32 PM  #12 exporting content cache
Sep 21 02:19:32 PM  #12 DONE 0.0s
Sep 21 02:19:33 PM  Pushing image to registry...
Sep 21 02:19:25 PM  ==> Transferred 58MB in 8s. Extraction took 0s.
Sep 21 02:19:34 PM  Upload succeeded
Sep 21 02:19:34 PM  DONE
Sep 21 02:19:36 PM  ==> Deploying...
Sep 21 02:19:42 PM  INFO:waitress:Serving on http://0.0.0.0:8080
Sep 21 02:19:47 PM  Your service is live šŸŽ‰
Sep 21 02:19:53 PM  ==> Detected service running on port 8080
Sep 21 02:19:53 PM  ==> Docs on specifying a port: https://render.com/docs/web-services#port-detection
Sep 21 02:19:34 PM  Upload succeeded
Sep 21 02:19:34 PM  DONE
Sep 21 02:19:34 PM  Upload succeeded
Sep 21 02:19:34 PM  DONE

Hey,

I tested it in both Python and Docker environments and couldnā€™t replicate the issue, suggesting our side is clear. The hiccup might stem from the ā€˜waitressā€™ package youā€™re utilizing, though I canā€™t say for certain. Is there a specific reason youā€™re aiming to print something at this juncture in your app? Perhaps try inserting a print statement in different sections of your code to see if that makes a difference?

JƩrƩmy.
Render Support, UTC+3

Found the solution for my case for anyone in the future.

import logging

app = Flask(name)

And use

app.logger.info(ā€œYour Messageā€)

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.