Deployment Reserved VM repl/stats/resources.json no such file or directory

Hello, I previously deployed my Repl with Autoscale option and deployment work but I was limited because my requests from Front End were timing out so I got recommendation to deploy Reserved VM and this is failing in promote step. The logs are showing following:

image

It seems like there is a problem with dependencies. I have followed the troubleshooting checklist and I have tried to enter the [env] commands in the .replit file but it didn’t help. My .replit file then looked as follows:

I am not sure if it is correct. The Repl runs well in development and the code work as expected with Autoscale. The Repl uses Django framework.

Thank you for any help in advance.
Petr

1 Like

From our debugging session – the answer is to not use poetry run. There’s a bug in our version of poetry that causes this not to work in Deployments. We’ve made a note to fix this but just omitting poetry run from the run command should still work.

1 Like

Tangentially here, what would be the solution if gunicorn isn’t found? IIRC that’s been on at least 1, maybe 2 topics already.

1 Like

Hello Lincoln, initially everything was working for me but I have added a new library and since then the Repl will eventually seemingly run, but the Webview will display “Bad Request (400)” and my other waypoints are not working as well. The deployment itself seems to work, even though I have redeployed with the new library (pdfminer 20191125). I tried to run the Repl also with the original command “poetry run gunicorn…” the result is the same. I have noticed that I have a new folder with environments “.local” and it contains some configs for nix. No idea how much it is connected to the issues I am experiencing. I tried to create new Repls from my github repository. This gave me some errors in console:

File "/home/runner/precisiondietappBEMIT-3/.pythonlibs/lib/python3.10/site-packages/openai/types/image.py", line 5, in <module>
    from .._models import BaseModel
  File "/home/runner/precisiondietappBEMIT-3/.pythonlibs/lib/python3.10/site-packages/openai/_models.py", line 20, in <module>
    from pydantic.fields import FieldInfo
  File "/home/runner/precisiondietappBEMIT-3/.pythonlibs/lib/python3.10/site-packages/pydantic/fields.py", line 18, in <module>
    from . import types
  File "/home/runner/precisiondietappBEMIT-3/.pythonlibs/lib/python3.10/site-packages/pydantic/types.py", line 33, in <module>
    from typing_extensions import Annotated, Literal, Protocol, TypeAlias, TypeAliasType, deprecated
ImportError: cannot import name 'TypeAliasType' from 'typing_extensions' (/nix/store/nv13brd9hw3wbajaxkrgfsngyfjg0xjj-python3.10-typing-extensions-4.5.0/lib/python3.10/site-packages/typing_extensions.py)

This happens when I have run command with “poetry run gunicorn …” I have the exact same libraries installed on my local machine where my local server works well.

When I try to run the command without “poetry run” I will get:

Traceback (most recent call last):
  File "/home/runner/precisiondietappBEMIT-3/.pythonlibs/bin/gunicorn", line 5, in <module>
    from gunicorn.app.wsgiapp import run
ModuleNotFoundError: No module named 'gunicorn'

“poetry show” command shows that I do have gunicors installed, I also have it installed in the UI “Packages”. Any idea what went wrong?

Try running poetry remove gunicorn then poetry add gunicorn in the Shell.

Hey @krastenics, the answer probably depends on the specifics of your library and application. If you’re still looking for a solution your best bet is going to be booking another debugging session here: Calendly

Thank you @Firepup650 for editing the previous comment for better readability. I was playing around with my Repls and with the local machine and I notice where the problem is (at least in my new Repls). In the Import error it states that the version of “typing-extensions” is not 4.9.0 which shows when I run “poetry show” but it is in fact 4.5.0.
When I created a new Repl again with all dependencies done in a way to use typing-extensions version 4.5.0 the Repl will run well.
It looks like there is an issue over this particular library. No idea if the error is on my side, specific to only my Repl or if it’s something system wide…
My new Repl is working well so far so I will continue there.
Thank you @lincoln-replit for your time and reply.

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