Problem when using new_managed_dataset_creation_helper()

Options
esteban23
esteban23 Registered Posts: 4 ✭✭✭✭
edited July 16 in Using Dataiku

Hi! I'm trying to create a dataset from a notebook using the method "new_managed_dataset_creation_helper()". E.g.:

dataset = builder.create()

Then, when running:

UnicodeDecodeErrorTraceback (most recent call last)
<ipython-input-23-cd2bbeff86b9> in <module>()
----> 1 dataset = builder.create()

/home/s-dataiku/Dataiku_install/dataiku-dss-8.0.4/python/dataikuapi/dss/dataset.pyc in create(self, overwrite)
    829             body = {
    830                 "name": self.dataset_name,
--> 831                 "creationSettings":  self.creation_settings
    832         })
    833         return DSSDataset(self.project.client, self.project.project_key, self.dataset_name)

/home/s-dataiku/Dataiku_install/dataiku-dss-8.0.4/python/dataikuapi/dssclient.pyc in _perform_json(self, method, path, params, body, files, raw_body)
   1011 
   1012     def _perform_json(self, method, path, params=None, body=None,files=None, raw_body=None):
-> 1013         return self._perform_http(method, path,  params=params, body=body, files=files, stream=False, raw_body=raw_body).json()
   1014 
   1015     def _perform_raw(self, method, path, params=None, body=None,files=None, raw_body=None):

/home/s-dataiku/Dataiku_install/dataiku-dss-8.0.4/python/dataikuapi/dssclient.pyc in _perform_http(self, method, path, params, body, stream, files, raw_body)
    991         try:
    992             http_res = self._session.request(
--> 993                     method, "%s/dip/publicapi%s" % (self.host, path),
    994                     params=params, data=body,
    995                     files = files,

UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 21: ordinal not in range(128)

The following error is printed:

import dataiku
client = dataiku.api_client()
project = client.get_project('myprojectname')
builder = project.new_managed_dataset_creation_helper("mydatasetname")
builder.with_store_into("myhdfsconnection", format_option_id="myformat")

I use the same parameters (for the string parameters 'myhdfsconnection' and 'myformat') that I choose when I create a dataset from the Inputs/Outputs Recipe menu.

Thanks!

Best Answer

  • esteban23
    esteban23 Registered Posts: 4 ✭✭✭✭
    Answer ✓
    Options

    Hi! I already solved it. I thought that in "myprojectname" one should input the project name as shown in the UI. Instead, one must input the uppercase name that appears in the URL.

Answers

Setup Info
    Tags
      Help me…