Works in development, not in production

Question:

In order to get pypotrace working I setup my .nix file.

image

I’ve been able to use this in development. Now when I deploy it fails, due to a missing library.

ImportError: libagg.so.2: cannot open shared object file:

If I was the one creating the production environment I would try and figure out what is going on here. The one-click-deployment process is pretty opaque. I would expect with a service like this, that the dev and production would be more compatible.

Replit Profile: https://replit.com/@karljensen

See:

It probably won’t help much, but I don’t know a solution.

1 Like

Thank you. Based on that other posting, I will include some more information. here is my .replit

entrypoint = "main.py"
modules = ["python-3.10:v18-20230807-322e88b"]

hidden = [".pythonlibs"]

[nix]
channel = "stable-23_05"

[deployment]
run = ["python3", "main.py"]
deploymentTarget = "cloudrun"
1 Like

I have no experience or knowledge about deployments, so hopefully someone else can help you more.
Does any of this help (make sure to fork your repl first in case it doesn’t work):

Also, there is a slightly related topic about a new feature:

2 Likes

Thank you. Read through this. I could submit this info to the other thread as is suggested to help add support.

As for the recommendations in the SO posting, I’m not using the python port because of:

Being written in python this code may be about 500x slower than the pure-c potrace. It is however fast enough for general use.

Thank you again for your responses. If I can’t get deployment working here, I can just go back to using docker myself.

I received help from Customer Support for this. They were able to help me resolve it by modifying my PATH environment variable.

In .replit I added:

[env]
PATH = "$PATH:$AGG"

Then added this to my replit.nix:

env = {
  AGG = "${pkgs.agg}";
};

Builds in production now.

2 Likes

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