You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to be able to split my logic into files within the function directory, or at least have it documented that I cannot.
Actual Behavior
When I added a second file to my function directory, if that file has a class the function will fail to load when deployed to an Azure Function App. Instead the logs will say:
If that file has only function definitions than everything works as expected. I have also moved the helper file with a class definition to a sub directory and it worked again.
There appears to be some form of reflection that is preventing the function entry from being detected. If this is fundamental to how the worker functions, then adding clear guidance to the documentation that this can't be done would be helpful.
Steps to Reproduce
Create a function app with the code below. This is pulled from the timer trigger documentation, but adds the import of the Helper class
Add the following code to helpers.py in the function directory:
Thank you for your example! This helped me narrow in a bit further on what seems to be going on. If there is a runtime error in the code before the function is defined (missing import, exception thrown in loading), then the function does not get loaded and there is no error messaging displayed to the user. However, the function deploys successfully.
Is there any way to get clearer messaging that there was an error in the function code that is preventing it from being loaded? Potentially improving the log message
Expected Behavior
I want to be able to split my logic into files within the function directory, or at least have it documented that I cannot.
Actual Behavior
When I added a second file to my function directory, if that file has a class the function will fail to load when deployed to an Azure Function App. Instead the logs will say:
If that file has only function definitions than everything works as expected. I have also moved the helper file with a class definition to a sub directory and it worked again.
There appears to be some form of reflection that is preventing the function entry from being detected. If this is fundamental to how the worker functions, then adding clear guidance to the documentation that this can't be done would be helpful.
Steps to Reproduce
Helper
classhelpers.py
in the function directory:Relevant code being tried
Relevant log output
requirements.txt file
No response
Where are you facing this problem?
Production Environment (explain below)
Function app name
No response
Additional Information
No response
The text was updated successfully, but these errors were encountered: