Python deployments issues

Problem description:
I am experiencing all sorts of problems with my python vm deployments. I set up a python background worker vm deployment last week and it went smoothly. I noticed that if I checked the logs section it would show me any print statements that my app generated which let me know it was working properly. Today I decided to deploy my other two remaining Python background worker bots to the same type of deployment. The first indicated that it went properly and self populated the run command with python 3 which seemed correct. The deployment indicated that it was a success. I shortly there after tried to deploy the 3rd app which is almost identical to the 2nd app. It did not autopopulate a run command so I just used the same command as the last one but I got an error during deployment:

warning: Detected broken symlink! The path "/home/runner/Python/venv/bin/python3" does not exist.

I later tore down the deployment and used python as the command instead which I thought would work since I checked the console to see if python worked whereas python3 did not. However… during the depployment build process it showed the same error about python3 not existing. I decided to check on my earlier first deployment.

The deployment from last week had quit showing any print statement logs since 12/24 whereas if it were actually running and logging properly it should give me an hourly statement of some kind. Also the deployments I just launched earlier today also should be giving me regular print statements in my log section but they do not. I only have two statements:

starting up user application
initializing deployment without listening for application ports

If any of my apps were actually running properly I believe I should see evidence of that in the logs, it looks like they are Not running properly. As mentioned before the first app was deployed last week and was running and logging perfectly fine and I made no interventions. My second concern is that with the most recent 3rd app I deployed, it displayed that error regarding the run command and the missing python3 so even if it were running properly I have serious doubts about its ability to start back up again.

Update next day: The app that gives me a regular update text every Wednesday did in fact send me the alert indicating that it was running. This means that the issue I was mainly experiencing was mostly related to the Logs section of Deployments not giving me updated information. My app regularly gives print statement updates which in the past were captured in the Deployment Logs section however for no apparent reason none of my deployments are displaying any of these in the deployment logs anymore. The timestamps also appear to be incorrect in the logs if they actually happen to display anything at all since mostly they display nothing. Without access to this info in the deployment logs it is exceptionally difficult for me to monitor if my apps are working or working properly or not working at all.

Expected behavior:

I expected the most recently deployed app’s run command to not generate any errors in deployment.

I expected my deployment logs to show my regularly expected print statements indicating that they are actually running like they have in the past.

Actual behavior:

I see no activity indicating proper performance in the deployment logs lately.

The run command for the 3rd deployment seems broken whether or not I build it using python3 or python

Steps to reproduce:

I just check the deployment logs and see the empty activity.

I tried deploying the 3rd app using both run statements and got the build error each time

OS: mac os
Device (Android, iOS, NA leave blank):
Desktop app version (Avatar menu->“Version”) or NA:

I tried in the replit desktop app and I also tried using the web browser version.

Plan (Free, Replit Core):
Teams Pro

Hey @avataraustin!

Can you please provide a link to the repl? This way it is easier for staff and members of the community to help you!

Also see this guide on how to share your code:

Only 1 of them is public. I am pretty sure its not an issue with my code as they have all been very stable before using as deployments.

The public one:

1 Like

@avataraustin I get this error when I run your Repl →

Traceback (most recent call last):
File "/home/runner/3786329025/", line 8, in <module> from send_emails import send_email
File "/home/runner/3786329025/", line 10, in <module>
receiver_email = os.environ['user_phones_email']
File "/nix/store/xf54733x4chbawkh1qvy9i1i4mlscy1c-python3-3.10.11/lib/python3
.10/", line 680, in _getitem_ raise KeyError(key) from None
KeyError: 'user_phones_email'

it runs fine, there are just several secret .env variables that would need to be configured for someone else to run it. If you forked it and put input an email address with smtp server etc… it should work for you.

1 Like