Transport Celonis CTP file via Python


Hello Team,

I am doing the use case to import transport file of Celonis CTP via Python and after importing i have to select the project and load the data source and map the tables and do import of tables via python.

Steps I have done :-

  1. Established the connection to Celonis :

            from celonis_tools.api import CelonisSession
            from celonis_tools.model import *
            with CelonisSession("Url", User_Name" , api_token="XXXX",
                     api_secret="XXXX") as session:
  2. Importing the file to project folder:

             t = Transport.import_transport("Python Testing","C:\\Users\\Parimala\\Desktop","Test123")

Throwing below error after running the code:

Traceback (most recent call last):

File “”, line 9, in
t = Transport.import_transport(“Python Testing”,“C:\Users\Parimala\Desktop”,“Test123”)

File “C:\Users\Parimala\AppData\Local\Continuum\anaconda3\lib\site-packages\celonis_tools\model\”, line 464, in import_transport
ret =“queue”, password=password, filename=filename)

File “C:\Users\Parimala\AppData\Local\Continuum\anaconda3\lib\site-packages\celonis_tools\”, line 105, in post
with open(filename, “rb”) as f:

PermissionError: [Errno 13] Permission denied: ‘C:\Users\Parimala\Desktop’

Issue is causing while importing transport,I have opened Python editor with administrative rights but still the same issue exists.

Please suggest if anything I am missing to test the use case I have picked.

Many thanks in advance.

Parimala N


Hey Parimala,

I’d suggest:

  1. placing your file in another folder, e.g. Downloads, and even better, in a ./data folder in your project directory
  2. specifying the full file path, e.g. r"C:\Users\d.holovatyi\Documents\work\code\TRANSPORT_NAME.CTP". Also note the letter r before the string - this means raw string in Python and lets you use single backslashes \ instead of double \.

Hope this helps!

1 Like

Hey Denys,

I have tried with all possibilities but it was problem with import of Transport package.
May i know if i am doing correctly.
Transport_Code.txt (473 Bytes)

Error :


Traceback (most recent call last):

File “”, line 12, in
t = Transport.import_transport(Project(“89071eaa-ec32-4b5c-bdfd-afa3fdc855b2”),r"C:\Users\Parimala\Desktop\CE_TRANSPORT_testtransport.CTP",“Celonis1234”)

File “C:\Users\Parimala\AppData\Local\Continuum\anaconda3\lib\site-packages\celonis_tools\model\”, line 145, in init

File “C:\Users\Parimala\AppData\Local\Continuum\anaconda3\lib\site-packages\celonis_tools\model\”, line 197, in load
ret = self.api.get([“id”], *args, **kw)

File “C:\Users\Parimala\AppData\Local\Continuum\anaconda3\lib\site-packages\celonis_tools\”, line 70, in get
ret = self.session.get(url, params=kw or None)

File “C:\Users\Parimala\AppData\Local\Continuum\anaconda3\lib\site-packages\requests\”, line 521, in get
return self.request(‘GET’, url, **kwargs)

File “C:\Users\Parimala\AppData\Local\Continuum\anaconda3\lib\site-packages\requests\”, line 508, in request
resp = self.send(prep, **send_kwargs)

File “C:\Users\Parimala\AppData\Local\Continuum\anaconda3\lib\site-packages\requests\”, line 618, in send
r = adapter.send(request, **kwargs)

File “C:\Users\Parimala\AppData\Local\Continuum\anaconda3\lib\site-packages\requests\”, line 506, in send
raise SSLError(e, request=request)

SSLError: HTTPSConnectionPool(host=‘’, port=1234): Max retries exceeded with url: /api/projects/nb2v312gh3g-v312v3v123-bnbn3b12/ (Caused by SSLError(SSLError(“bad handshake: Error([(‘SSL routines’, ‘ssl3_get_record’, ‘wrong version number’)],)”,),))

Is my argument passing for project id in import_transport is correct?



Hi Parimala,

depending on your server and network setup it might be not possible to check SSL certificates - you could try specifying

with CelonisSession("Url", User_Name" , api_token="XXXX", api_secret="XXXX", verify=False) as session:



Hi Denys,

I am using with verify = False also, its throwing SSL error.

SSLError: HTTPSConnectionPool(host=‘dssfsdjfsdjfjdshfj’, port=9000): Max retries exceeded with url: /api/projects/89071eaa-ec32-4b5c-bdfd-afa3fdc855b2/ (Caused by SSLError(SSLError(“bad handshake: Error([(‘SSL routines’, ‘ssl3_get_record’, ‘wrong version number’)],)”,),))

And my another doubt is in my code is that how we have to pass for project id?



Hi Parimala,

to speficy your project you could either do

p = Project(“YOUR_PROJECT_ID”) # this one is more robust or
p = Project.find(“name”, “YOUR_PROJECT_NAME”).first() # this one is more flexible if you delete/ re-create a dev project with the same name

Hope it helps!