Can deploy first repl, but works in console, help?

I am not sure what I’m missing in the codebase. It works locally, and then also when I click “run” from the Repl homepage, but when I deploy I get this error:
Repl link/Link to where the bug appears:

2024-02-09T20:03:00Z info: Deployment: b53fb4c8-090e-42c3-9cd4-4e2ca9f3a7df
2024-02-09T20:03:00Z info: Build: 649f3936-fb2e-46fb-8eb8-eb0e59386489
2024-02-09T20:03:00Z info: Connecting to builder
2024-02-09T20:03:01Z info: Builder connected
2024-02-09T20:03:02Z info: Installing packages
--> poetry env list --full-path

2024-02-09T20:03:02Z info: Skipping Build as no Build command set
2024-02-09T20:03:02Z info: Pushing pid1 binary layer...
2024-02-09T20:03:04Z info: Created pid1 binary layer
2024-02-09T20:03:05Z info: Skipping Python layer creation
2024-02-09T20:03:05Z info: Skipping Node layer creation
2024-02-09T20:03:05Z info: Pushing hosting layer...
2024-02-09T20:03:05Z info: Pushing Repl layer...
2024-02-09T20:03:05Z info: Retrieved cached nix layer
2024-02-09T20:03:05Z info: Created hosting layer
2024-02-09T20:03:23Z info: Created Repl layer
2024-02-09T20:03:23Z info: Pushed image manifest
2024-02-09T20:03:24Z info: Pushed soci index manifest
2024-02-09T20:03:31Z info: Creating Autoscale service
2024-02-09T20:03:32Z error: The deployment failed to initialize due to a configuration or code error. Check the logs tab for more information. For additional support, please post on and a staff member will take a look.

maybe it says it is already started? But again, first time here, not sure where?
Screenshots, links, or other helpful context:

code snippet

I saw some errors about lines being too long: (>88) and trimmed those down to test, but still didn’t let me deploy.

Thanks all!
any tips?

Hello @andytillo1!

Could you please copy-paste the Deployment logs here?

How to open Deployment logs
  1. Open new tab
  2. Type Deployments
  3. Select “Deployments”
  4. Select the Logs tab
1 Like

…an update for anyone watching, tried to run a print("hello world") and get: 02/09/24 02:24:15 PM exec [python3] error=exec: already started

I can deploy non-python apps (deployed a javascript one fine from the repo) and runs well. I think it’s something with the Python?

Anyway, yea, if anyone has any tips at all for deploying or showing config of a working Python, would appreciate any tips! Thanks.

oh, missed this, thank you! Yea, here’s my logs for even the hello world app:

02/09/24 02:24:15 PM exec [python3] error=exec: already started
02/09/24 02:24:15 PM Hello World
02/09/24 02:24:15 PM starting up user application
02/09/24 02:21:37 PM exec [python3] error=exec: already started
02/09/24 02:21:37 PM Hello World
02/09/24 02:21:36 PM starting up user application

Oh, I see. I think you should deploy your Repl as a Reserved VM > Background Worker.

ohhhh, ok, testing! Fingers crossed:

Upon thinking on it, and it still spinning but continuing to say “hello world” --is that how it ought to run? If my local python script runs all from console, do I need to make it a flask app to be run in replit or for a user to interact with it?

I’m pretty sure that deployments do not have input.

Could you send your code? It looks like a code problem.

1 Like

it’s literally just a hello world for now:

…but ultimately looking to get this into repl: GitHub - tillo13/cohere_demo

If I can get this to show in a webpage, my thought was that I could make a console-like way someone could interact, but the more I dig in, the more I’m thinking I’m misunderstanding what repl does --it won’t recreate a console look/feel will it? And that’s what I think about having to use it as a Flask app.
Deployment tab: Production


andytillo1 failed to deploy about 1 hour ago



Reserved VM(0.5 vCPU / 2 GiB RAM)Manage

Deployments do not provide a console look, unlike Always On. The closest thing to the console on Deployments is the Log tab I showed you already.

No, Replit will not show it’s built-in terminal to the webview. If you are thinking of building your own console, try XtermJS.


If your repl is a console repl, there would be no reason to deploy it unless it is a bot, for things like Discord or Telegram. Users can only run it if they fork the repl.
However, if you would like to connect it with a web app, try using Flask, and deploy with Autoscale.