Skip to main content
Solved

Problems with python sdk v8.

  • May 4, 2026
  • 3 replies
  • 18 views

When we’ve tried to update to python sdk v8 we get a 400 validation issue when we try to create a container.

We’re currently using v7.92.0, where we have no problems. We’ve tested versions v8.0.7 and v8.2.0.

client.config.api_subversion is ‘20230101’ for both 7.92.0 and 8.2.0.

Here is an example of a request that fails with: Unexpected field - items[0].properties..constraintState.

constraintState seems to be a new property for v8 of the api.

ContainerApply(
space="Space",
external_id="Comp",
name="Comp",
used_for="node",
properties={
"manufacturer_name": ContainerProperty(
type=Text(),
nullable=True,
)
}
)

I notice also that the CDF Jupyter notebook in browser is still on v7.92.0. Is there potentially any other issues preventing an upgrade to v8?

 

Best Regards

Daniel Rasmussen

Best answer by Arild Eide

Hi ​@Daniel Rasmussen 

 

Data classes in the Python SDK usually has to variants one to represent resources when reading from the API and one for writing/applying - for instance Container and ContainerApply

For container properties the apply class was quite recently added - so in this case you should be using ContainerPropertyApply. Please see the general documentation on migrating between major versions.

I will need to check the timeline for Python SDK v8  in Jupyter Notebooks in Fusion.

 

Regards,

 

Arild Eide

 

3 replies

Arild  Eide
Expert ⭐️⭐️⭐️⭐️
Forum|alt.badge.img
  • Expert ⭐️⭐️⭐️⭐️
  • Answer
  • May 4, 2026

Hi ​@Daniel Rasmussen 

 

Data classes in the Python SDK usually has to variants one to represent resources when reading from the API and one for writing/applying - for instance Container and ContainerApply

For container properties the apply class was quite recently added - so in this case you should be using ContainerPropertyApply. Please see the general documentation on migrating between major versions.

I will need to check the timeline for Python SDK v8  in Jupyter Notebooks in Fusion.

 

Regards,

 

Arild Eide

 


Arild  Eide
Expert ⭐️⭐️⭐️⭐️
Forum|alt.badge.img
  • Expert ⭐️⭐️⭐️⭐️
  • May 4, 2026

Hi ​@Daniel Rasmussen 

 

Received confirmation that v8 now works in Jupyter Notebooks, but the default is still v7. If you run a cell with the below as the first thing you should have v8 available:

import micropip
micropip.uninstall("cognite-sdk")
await micropip.install("cognite-sdk")

 

Arild Eide


  • Author
  • Committed ⭐️⭐️
  • May 5, 2026

Thanks for the help, I’ll re-read the documentation of the api’s more closely next time. 🙂