Troubleshooting
This article helps you resolve issues you may meet using Cognite Functions.
Incorrect folder structure when deploying a function as a zip file
Cognite Functions expects handler.py
to be at the root of the zipped folder or at a path relative to the root as pointed to by the function_path
attribute.
The following errors occur when handler.py
isn't found at either of these locations.
Error messages:
When using the API to publish the function, you may see this error message in Cognite Data Fusion (CDF) if the function deployment fails:
No Python module found at location "handler.py" in zip-file.
If you use the Cognite SDK to publish the function, you may see this error message if the function deployment fails:
No file found at location.
This typically occurs when the root folder is zipped and not the folder content. Here's an example of a wrong folder structure:
func/
├── handler.py
└── requirements.txt