Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

python3 compatibility #20

Open
FChataigner opened this issue Jan 26, 2018 · 4 comments
Open

python3 compatibility #20

FChataigner opened this issue Jan 26, 2018 · 4 comments
Labels

Comments

@FChataigner
Copy link
Contributor

at least iter_rows() on sql_query and dataset fail

@victorjourne
Copy link

victorjourne commented Feb 7, 2019

I confirm, on a dataikuapi.dss.dataset.DSSDataset object, iter_rows() fails:


Error Traceback (most recent call last)
in
2 print(columns)
3 row_count = 0
----> 4 for row in dataset.iter_rows():
5 print(row)
6 row_count = row_count + 1

/opt/conda/lib/python3.6/site-packages/dataikuapi/utils.py in iter_rows(self)
83 delimiter='\t',
84 quotechar='"',
---> 85 doublequote=True):
86 yield [none_if_throws(caster)(val)
87 for (caster, val) in dku_zip_longest(casters, uncasted_tuple)]

Error: iterator should return strings, not bytes (did you open the file in text mode?)

Config:

  • dataiku-api-client 4.3.0
  • Python 3.6

@victorjourne
Copy link

@FChataigner, did you install the package with pip?
install the latest version of dataikuapi with the setup.py, works now for me!

@bandaangosta
Copy link
Contributor

This was fixed with pull request #33, although it appears it has not reached pypi yet.
In the meantime, you can install latest version directly from this repository:

pip install git+https://github.com/dataiku/dataiku-api-client-python@master#egg=dataiku-api-client

@ankurc9
Copy link

ankurc9 commented Aug 2, 2019

@bandaangosta, Thank you so much for the solution. It worked for me. However installing the latest version still does not resolve the problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants