Survey banner
The Dataiku Community is moving to a new home! Some short term disruption starting next week: LEARN MORE

CICD Project Deployment

Level 1
CICD Project Deployment

Hi there, I'm trying to connect DSS to gitlab cicd to upload exported projects automatically.

But I get a wired bug. In core it boils down to the question how to use import_bundle_from_stream.

Below you'll see my deploy script. What kind of stream expect the method? I'm using an full access api key.

import os
import dataikuapi

api_key = os.environ['APIKEY']
bundle = os.environ['DATAIKUBUNDLE']
url = os.environ['DATAIKUURL']

client = dataikuapi.DSSClient(host=url, api_key=api_key)
#new_project = client.create_project('TEST_PROJECT', 'test project', 'tester', description='a simple description')
project = client.get_project('BASKETBALLv2')
with open(os.path.join('demos',bundle), 'rb') as bundle_stream:

Error log:

$ python
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/dataikuapi/", line 854, in _perform_http
  File "/usr/local/lib/python3.6/site-packages/requests/", line 940, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 403 Client Error: Forbidden for url: http://XXXXXXX/dip/publicapi/projects/BASKETBALLv2/bundles/imported/actions/importFromStream

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "", line 12, in <module>
  File "/usr/local/lib/python3.6/site-packages/dataikuapi/dss/", line 633, in import_bundle_from_stream
  File "/usr/local/lib/python3.6/site-packages/dataikuapi/", line 864, in _perform_empty
    self._perform_http(method, path, params=params, body=body, files=files, stream=False, raw_body=raw_body)
  File "/usr/local/lib/python3.6/site-packages/dataikuapi/", line 861, in _perform_http
    raise DataikuException("%s: %s" % (ex.get("errorType", "Unknown error"), ex.get("message", "No message")))
dataikuapi.utils.DataikuException: com.dataiku.dip.exceptions.UnauthorizedException: Failed to read project permissions
ERROR: Job failed: exit code 1


0 Kudos
1 Reply

Hi Ben.

Can you clarify what you want to do?
Which node are you importing the project? Design or Automation?
Which file do you have with you? Bundle zip file or the project export zip file?

0 Kudos