I am working with a custom python module to catch AppwriteExceptions and return them in a standard format within my company, I am using the following import statement:
from src.errors.error_codes import handle_error
and while the code works just fine when I run it localy, when I deploy it, it returns a Module Not Found error, my current file directory looks like this:
│ .gitignore
│ README.md
│ requirements.txt
│
└───src
│ main.py
│
└───errors
error_codes.py
__init__.py
Do you have pip install -r requirements.txt set in the build settings? What's the full error?
from src.errors.error_codes import *
ModuleNotFoundError: No module named 'src'
i do have the pip install set in the build settings, but do i need to pip install a module that is inside the function directory?
What does your requirements.txt look like?
just appwrite
based on the tree, any change if you just do from errors.error_codes import handle_error?
I tried doing that, and it returned the same error, just without 'src'
Recommended threads
- Unable to add data for "user_id" column
I am using the Appwrite database and I have a table named events. When I add a column named user_id, I am not able to save data to that column from either the A...
- Example of Rows in upsert_rows function
what is format of rows that can be passed to upsert_rows function? result = tables_db.upsert_rows( database_id = '<DATABASE_ID>', table_id = '<TABLE_I...
- [Sites] pnpm Turborepo monorepo — stuck ...
deployment seems to never finish. Testing Appwrite Sites with a standard pnpm Turborepo monorepo (npx create-turbo@latest). Repo: https://github.com/saitrogen/...