Skip to main content

Hi,

 

I have a python script that retrieves information about knowledge models, variables, and KPIs for documentation purposes. For some reason, the script is errorring out, when trying to retrieve KPIs, whereas previously it worked.

 

Has anyone got an idea why this is not working now and how I can fix the error?scripterror 

Thank you,

 

Teun

Hello, which PyCelonis version?


Hi @Teuku Faruq,

 

Version 1.7.6. I was also wondering whether it had something to do with this.

I tried to update to the latest version but for some reason it doesn't pick it up:

 

Update to Pycelonis 2.0.*:Pycelonis version1PyCelonis version when connecting:

 

Pycelonis version2 

Any idea?

 

Thanks in advance.

 

Best,

Teun


I would check if somebody has updated celonis and you are using other version

 

 

https://celonis.github.io/pycelonis/2.0.0/tutorials/executed/01_quickstart/01_installation/#2-install-pycelonis

 

print(pycelonis.__version__)

 

 


Hi @Guillermo Gost,

 

This is where I get lost. It says I'm using version 1.7.6, but when I update Pycelonis, I get the notification that I do have version 2.0.1. Do you know how this is possible and how this can be fixed?

 

Pycelonis version3 

Thanks,

Teun


Hi @Guillermo Gost,

 

This is where I get lost. It says I'm using version 1.7.6, but when I update Pycelonis, I get the notification that I do have version 2.0.1. Do you know how this is possible and how this can be fixed?

 

Pycelonis version3 

Thanks,

Teun

Restart the kernel and do the import pycelonis again, then execute only the print version, and let's see what we get...


@Guillermo Gost that works, thanks! I keep on running into different errors though as version 2.0.1 is set up completely differently. Any idea what I'm doing wrong here? There should be a get_packages() function https://celonis.github.io/pycelonis/2.0.1/reference/pycelonis/ems/studio/space/#pycelonis.ems.studio.space.Space.get_packages

 

Pycelonis error 

Thanks,

Teun


@Guillermo Gost that works, thanks! I keep on running into different errors though as version 2.0.1 is set up completely differently. Any idea what I'm doing wrong here? There should be a get_packages() function https://celonis.github.io/pycelonis/2.0.1/reference/pycelonis/ems/studio/space/#pycelonis.ems.studio.space.Space.get_packages

 

Pycelonis error 

Thanks,

Teun

"space" is a collection, listing all the existing spaces. Thus has not methods.

You need to select on space using space=celonis.studio.get_spaces().find("space to use")

Then the resulting space contains a space object, that, hopefully, will contains packages.

 

Again get_packages() return a collection (a dict if I recall correctly), so again you need to select one in order to continue working (like crerating a new analysis)

 

HTH


Hi @Guillermo Gost,

Is there no way to select all available assets (space/package/knowledge models/variables, etc)?

 

Thanks,

Teun


Hi @Guillermo Gost,

Is there no way to select all available assets (space/package/knowledge models/variables, etc)?

 

Thanks,

Teun

Nope. You have to iterate. Usually will be something like

 

for space in celonis.studio.spaces():

for package in space.get_packages():

for analysis on package.get_analysis():

.... et cetera, et cetera ....

 

HTH

 

(if you want to clon some space, I think there is a tool to clone and backup things, but don't remember the name at the moment)


Reply