Thorge
Thorge
RRailway
Created by Thorge on 8/24/2023 in #✋|help
Fix Missing libuuid Library
Hey, I am currently runnig into problems deploying my FastAPI backend after adding a new dependency to my requirements.txt (azure-cognitiveservices-speech==1.31.0). project and service id: project/21c22b76-3eeb-4e49-8c44-af1f48a72060/service/b1ea6565-9ca2-485e-8f39-be6b7f6cbbe9 Error:
File "/opt/venv/lib/python3.10/site-packages/azure/cognitiveservices/speech/__init__.py", line 8, in <module>

from .speech import *

File "/opt/venv/lib/python3.10/site-packages/azure/cognitiveservices/speech/speech.py", line 13, in <module>

from .interop import (

File "/opt/venv/lib/python3.10/site-packages/azure/cognitiveservices/speech/interop.py", line 20, in <module>

_sdk_lib = load_library.LoadLibrary(lib_path)

File "/root/.nix-profile/lib/python3.10/ctypes/__init__.py", line 452, in LoadLibrary

return self._dlltype(name)

File "/root/.nix-profile/lib/python3.10/ctypes/__init__.py", line 374, in __init__

self._handle = _dlopen(self._name, mode)

OSError: libuuid.so.1: cannot open shared object file: No such file or directory
File "/opt/venv/lib/python3.10/site-packages/azure/cognitiveservices/speech/__init__.py", line 8, in <module>

from .speech import *

File "/opt/venv/lib/python3.10/site-packages/azure/cognitiveservices/speech/speech.py", line 13, in <module>

from .interop import (

File "/opt/venv/lib/python3.10/site-packages/azure/cognitiveservices/speech/interop.py", line 20, in <module>

_sdk_lib = load_library.LoadLibrary(lib_path)

File "/root/.nix-profile/lib/python3.10/ctypes/__init__.py", line 452, in LoadLibrary

return self._dlltype(name)

File "/root/.nix-profile/lib/python3.10/ctypes/__init__.py", line 374, in __init__

self._handle = _dlopen(self._name, mode)

OSError: libuuid.so.1: cannot open shared object file: No such file or directory
I tried installing it in my nixpacks.toml file, but it still doesn't work
[phases.validate_libuuid]
cmds = ["ldconfig -p | grep libuuid"]
dependsOn = ["setup"]


# Add a new phase for installing the Prisma CLI
[phases.install_prisma]
cmds = ["npm install -g prisma","which python","python --version"]
dependsOn = ["install"]

# Add a new phase for Prisma generation
[phases.prisma_generate]
cmds = ["prisma generate --schema ./trellis_backend/prisma/schema.prisma"]
dependsOn = ["install_prisma"]

# Update the build phase to depend on the new 'prisma_generate' phase
[phases.build]
dependsOn = ["...", "prisma_generate"]
[phases.validate_libuuid]
cmds = ["ldconfig -p | grep libuuid"]
dependsOn = ["setup"]


# Add a new phase for installing the Prisma CLI
[phases.install_prisma]
cmds = ["npm install -g prisma","which python","python --version"]
dependsOn = ["install"]

# Add a new phase for Prisma generation
[phases.prisma_generate]
cmds = ["prisma generate --schema ./trellis_backend/prisma/schema.prisma"]
dependsOn = ["install_prisma"]

# Update the build phase to depend on the new 'prisma_generate' phase
[phases.build]
dependsOn = ["...", "prisma_generate"]
60 replies
RRailway
Created by Thorge on 5/15/2023 in #✋|help
"Environment variable not found"
Hi Railway Team! I have the URL of my postgres db stored inside an environment variable that I want to access in my prisma.schema:
datasource db {
provider = "postgresql"
url = env("DATABASE_URL")
}
datasource db {
provider = "postgresql"
url = env("DATABASE_URL")
}
When I run prisma db push I get the following error:
error: Environment variable not found: DATABASE_URL.
--> schema.prisma:3
|
2 | provider = "postgresql"
3 | url = env("DATABASE_URL")
|

Validation Error Count: 1
error: Environment variable not found: DATABASE_URL.
--> schema.prisma:3
|
2 | provider = "postgresql"
3 | url = env("DATABASE_URL")
|

Validation Error Count: 1
I can read successfully the environment variable inside my main.py with: print("db_url", os.environ.get("DATABASE_URL")) When I create an .env file w/ the DATABASE_URL variable either in the prisma folder or in the root of the project, I can successfully run prismadb push This is super confusing to me. Any help would be appreciated.
37 replies