Skip to main content

---------------------------------------------------------------------------

HTTPError Traceback (most recent call last)

~/.local/lib/python3.8/site-packages/pycelonis/celonis_api/base_objects/ibc.py in api_request(self, url, message, method, timeout, get_json, threaded, **extra)

273 try:

--> 274 r.raise_for_status()

275 except exceptions.HTTPError as e:

 

/opt/conda/lib/python3.8/site-packages/requests/models.py in raise_for_status(self)

952 if http_error_msg:

--> 953 raise HTTPError(http_error_msg, response=self)

954

 

HTTPError: 404 Client Error: Not Found for url: https://dell.us-1.celonis.cloud/process-mining/analysis/v1.2/api/analysis/325c3e97-3a13-4c7a-b818-ac392eebd840/bookmarks/809dfc8f-86c4-4210-9818-a4b2734543c6

 

During handling of the above exception, another exception occurred:

 

HTTPError Traceback (most recent call last)

/tmp/ipykernel_16778/3654934662.py in <module>

----> 1 (backlog_df,source_df,repair_df,order_df,spare_df,vmidf,doidf,voidf,osrc_df,ospr_df)=getCelonisData()

2 (nb_open,Rebal_open,Replen_open)=GetDataFromFile()

 

/tmp/ipykernel_16778/4056361805.py in getCelonisData()

12 "OtherregionSpares":pd.DataFrame()}

13 url = "https://dell.us-1.celonis.cloud/package-manager/ui/studio/ui/assets/bb995522-e0a5-4675-a44f-c577ae95f1de#!/documents/bb995522-e0a5-4675-a44f-c577ae95f1de/view/sheets/3ef3643c-9f0c-4322-ba19-57871278b79f/b/809dfc8f-86c4-4210-9818-a4b2734543c6"

---> 14 selection = analysis.process_shared_selection_url(url)

15 for src in dictdf.keys():

16 component = analysis.draft.components.find(src)

 

~/.local/lib/python3.8/site-packages/pycelonis/celonis_api/process_analytics/analysis.py in process_shared_selection_url(self, shared_url)

227 assert bookmark, "No bookmark reference found in URL"

228 url = f"{self.url}/bookmarks/{bookmarko1]}"

--> 229 r = self.celonis.api_request(url)

230 query = pql.PQL()

231 query.add(self.published.calculate_variables(rb"analysisState"]q"variables"]))

 

~/.local/lib/python3.8/site-packages/pycelonis/celonis_api/base_objects/ibc.py in api_request(self, url, message, method, timeout, get_json, threaded, **extra)

275 except exceptions.HTTPError as e:

276 if r.text:

--> 277 raise exceptions.HTTPError(

278 f"{str(e.args(0])} \\n \\

279 Error Message: \\n {r.text} \\n Request: \\n {self._clean_http_message(http_message)}",

 

HTTPError: 404 Client Error: Not Found for url: https://dell.us-1.celonis.cloud/process-mining/analysis/v1.2/api/analysis/325c3e97-3a13-4c7a-b818-ac392eebd840/bookmarks/809dfc8f-86c4-4210-9818-a4b2734543c6

Error Message:

Object 'AnalysisBookmark' with ID '809dfc8f-86c4-4210-9818-a4b2734543c6' not found

Request:

send: b'GET /process-mining/analysis/v1.2/api/analysis/325c3e97-3a13-4c7a-b818-ac392eebd840/bookmarks/809dfc8f-86c4-4210-9818-a4b2734543c6 HTTP/1.1\\r\\nHost: dell.us-1.celonis.cloud\\r\\nUser-Agent: pycelonis/1.5.14\\r\\nAccept-Encoding: gzip, deflate, br\\r\\nAccept: */*\\r\\nConnection: keep-alive\\r\\nauthorization: AppKey ************* Cookie: XSRF-TOKEN=72448285-2b08-407c-91c3-f238d9ad1824\\r\\n\\r\\n'

reply: 'HTTP/1.1 404 Not Found\\r\\n'

header: Date: Mon, 05 Sep 2022 08:10:11 GMT

header: Content-Type: text/plain;charset=UTF-8

header: Content-Length: 82

header: Connection: keep-alive

header: x-celonis-realm: us-1.celonis.cloud

header: content-security-policy: report-uri /process-mining/api/public/csp-report/; img-src res.cloudinary.com 'self' blob: twemoji.maxcdn.com https: data:; style-src https://*.userlane.com fonts.googleapis.com 'unsafe-inline' 'self' *.appcues.com *.appcues.net 'report-sample'; connect-src wss://*.appcues.com wss://api.appcues.com https://*.userlane.com https://*.logs.datadoghq.com 'self' wss://api.appcues.net *.appcues.com wss://*.appcues.net https://localhost:* wss://*.celonis.cloud https://translation.mf.celonis.cloud https://*.browser-intake-datadoghq.com *.celonis.cloud *.appcues.net https://*.azurewebsites.net data:; child-src 'self' *.celonis.cloud blob:; manifest-src 'self'; default-src 'self' *.celonis.cloud; frame-src 'self' *.appcues.com; object-src 'self'; media-src 'self' *.celonis.cloud blob:; worker-src 'self' *.celonis.cloud blob:; font-src https://*.userlane.com https://fonts.gstatic.com 'self' data:; base-uri 'self'; script-src-elem https://*.userlane.com static.celonis.cloud https://fast.appcues.net 'self' http://localhost:* https://fast.appcues.com/91241.js blob: https://localhost:* 'unsafe-hashes' https://*.azurewebsites.net 'unsafe-eval' https://fast.appcues.com; script-src https://*.userlane.com https://fast.appcues.net 'self' 'sha256-rRMdkshZyJlCmDX27XnL7g3zXaxv7ei6Sg+yt4R3svU=' http://localhost:* https://fast.appcues.com/91241.js https://localhost:* 'report-sample' 'unsafe-hashes' https://fast.appcues.com 'unsafe-eval'

header: x-content-type-options: nosniff

header: x-xss-protection: 1; mode=block

header: cache-control: no-cache, no-store, max-age=0, must-revalidate

header: pragma: no-cache

header: expires: 0

header: x-frame-options: SAMEORIGIN

header: Strict-Transport-Security: max-age=31536000; includeSubDomains

 

 

 

Got This Error when i am running the code can please provide the solution

 

It seems it can't find the Analysis

 

Error Message: 

Object 'AnalysisBookmark' with ID '809dfc8f-86c4-4210-9818-a4b2734543c6' not found

 

Either you don't have permissions, or the name is wrong

 

HTH


What type of permission do i need

 


well, depends your code and what you want... but, said that, usually Analyst role on the specific Analysis, Package and Space will do.

 


well, depends your code and what you want... but, said that, usually Analyst role on the specific Analysis, Package and Space will do.

 

I have use application key to get data that API_token has below permissions in that i dont see the studio analysis package and space permission so can i get that permission

pycelonis: Your key has following permissions:

>

{

"permissions": ],

"serviceName": "package-manager"

},

{

"permissions": ],

"serviceName": "workflows"

},

{

"permissions": ],

"serviceName": "task-mining"

},

{

"permissions": ],

"serviceName": "team"

},

{

"permissions": ],

"serviceName": "action-engine"

},

{

"permissions": ],

"serviceName": "process-repository"

},

{

"permissions":

"$ACCESS_CHILD"

],

"serviceName": "process-analytics"

},

{

"permissions": ],

"serviceName": "transformation-center"

},

{

"permissions": ],

"serviceName": "storage-manager"

},

{

"permissions":

"$ACCESS_CHILD"

],

"serviceName": "event-collection"

},

{

"permissions":

"USE_ALL_SCHEDULERS",

"USE_ALL_APPS",

"USE_ALL_MLFLOWS"

],

"serviceName": "ml-workbench"

},

{

"permissions": ],

"serviceName": "user-provisioning"

}

]

 


I have use application key to get data that API_token has below permissions in that i dont see the studio analysis package and space permission so can i get that permission

pycelonis: Your key has following permissions:

[

{

"permissions": [],

"serviceName": "package-manager"

},

{

"permissions": [],

"serviceName": "workflows"

},

{

"permissions": [],

"serviceName": "task-mining"

},

{

"permissions": [],

"serviceName": "team"

},

{

"permissions": [],

"serviceName": "action-engine"

},

{

"permissions": [],

"serviceName": "process-repository"

},

{

"permissions": [

"$ACCESS_CHILD"

],

"serviceName": "process-analytics"

},

{

"permissions": [],

"serviceName": "transformation-center"

},

{

"permissions": [],

"serviceName": "storage-manager"

},

{

"permissions": [

"$ACCESS_CHILD"

],

"serviceName": "event-collection"

},

{

"permissions": [

"USE_ALL_SCHEDULERS",

"USE_ALL_APPS",

"USE_ALL_MLFLOWS"

],

"serviceName": "ml-workbench"

},

{

"permissions": [],

"serviceName": "user-provisioning"

}

]

 

Go to the analysis in Studio. Right click and permissions. Be sure your App key has use permissions.


Reply