openfaas / faas

OpenFaaS - Serverless Functions Made Simple
https://www.openfaas.com
MIT License
24.75k stars 1.92k forks source link

Question: Import path for common modules #1811

Closed muehan closed 9 months ago

muehan commented 9 months ago

I created a common folder for reusable code as documented here: https://docs.openfaas.com/reference/yaml/#copy

How do you deal with the error in the handle.py function that the module at development time is not found? from function.common.CUSTOMCLASS import CUSTOMCLASS

I can not use the extraPaths in VS Code because the folder "function" does not exist at all. There must be a solution to not have errors at development time and call the script from a test.py but I can't find one.

many thanks for your help.

alexellis commented 9 months ago

Hi @muehan you'll have to fill out the issue template.

Is there a valid reason why you deleted it instead of doing what we ask for in order to be able to help you?

https://raw.githubusercontent.com/openfaas/faas/master/.github/ISSUE_TEMPLATE.md

Fill it out in detail, including what you've tried and what error you received.

Once you've done that, ping me and I'll reopen the issue.

muehan commented 9 months ago

I have not deleted anything. no idea what you are talking about, sorry.