We're excited to announce that we're launching the second installment of Dataiku Product Days Register Now

Problem when using new_managed_dataset_creation_helper()

Solved!
esteban23
Level 2
Problem when using new_managed_dataset_creation_helper()

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

 

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")

 

Then, when running:

 

dataset = builder.create()

 

The following error is printed:

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)

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!

0 Kudos
1 Solution
esteban23
Level 2
Author

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. 

View solution in original post

2 Replies
esteban23
Level 2
Author

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. 

View solution in original post

CoreyS
Community Manager
Community Manager

Hi @esteban23! Thank you for sharing your solution.

Looking for more resources to help you use Dataiku effectively and upskill your knowledge? Check out these great resources: Dataiku Academy | Documentation | Knowledge Base

A reply answered your question? Mark as ‘Accepted Solution’ to help others like you!
A banner prompting to get Dataiku DSS