Hi!
After switching from experimental to cognite-sdk 3.9.0 I struggle with deployment.
1: Using handle
If i try to deploy using the handle, then the requirements are not handled. The function deploys, but failing at the imports. How should requiremenents be used when deploying like this?
Imports are inside handle():
def handle(client, data, secrets): from googleapiclient.discovery import build from googleapiclient.errors import HttpError
Creating function like this:
cognite_client.functions.create( name=function_name, external_id=function_ext_id, function_handle=handle)
2 - Using a folder.
Then I get this error:
[WinError 267] The directory name is invalid: 'C:\Users\hknap\AppData\Local\Temp\tmptzkywbdl\function.zip'
If I debug, the folder “tmptzkywbdl” is created, so there should be no permission issues.
3- Manually uploading the zip file
This works (including the requirements.txt), thanks for adding this possibility. It is just a little extra hassle ;) would prefer if 1 was working.
Regards,