Skip to main content
Answer

Deploying function to CDF

  • September 11, 2025
  • 2 replies
  • 29 views

Forum|alt.badge.img+1

Hello,

I am going through the Hands-On exercise of Cognite Functions and trying to run the code as per Notebook 2 (Deploying a Cognite Function via the SDK). I was able to create the handler function but deploying the function to CDF is throwing a Runtime Error ‘Could not retrieve the file from files API’ as shown below:

Can you please help me with this? As you can see below the handle function is created successfully so I’m not sure what’s going wrong.

 

Best answer by Varunair

Hello Sofie,

I found the issue, I had to change the runtime from py39 to py311.

2 replies

Sofie Haug
Seasoned Practitioner
Forum|alt.badge.img+12
  • Cognite Academy Instructor
  • September 11, 2025

Hi ​@Varunair 

Since it mentions this as a RunTimeError, have you tried to re-run the command? 


Forum|alt.badge.img+1
  • Author
  • Seasoned
  • Answer
  • September 12, 2025

Hello Sofie,

I found the issue, I had to change the runtime from py39 to py311.