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

TypeError when trying to export Dataset #69

Open
Justinbenfit23 opened this issue Oct 30, 2021 · 1 comment
Open

TypeError when trying to export Dataset #69

Justinbenfit23 opened this issue Oct 30, 2021 · 1 comment
Assignees

Comments

@Justinbenfit23
Copy link

I am trying to export a dataset from my company's Domo instance and am getting the following error when trying to run the following code (I have removed the actual client_id, client_secret, and data_set_id:

import pandas as pd
domo = Domo('client_id','client_secret', api_host='api.domo.com')
domo.ds_get('data_set_id')```

results in `TypeError: <class 'bool'> is not convertible to datetime`

I checked the github and it looks like the function definition for the ds_get function attempts the following on each column of the dataset:

`for col in df.columns:
            if df[col].dtype == 'object':
                try:
                    df[col] = to_datetime(df[col])
                except ValueError:
                    pass`
This seems to be where I am getting the TypeError which appears to be failing because this try-except block looks to only handle ValueErrors. Is there any way to get around this? 

@jeremydmorris jeremydmorris self-assigned this Nov 3, 2021
@jeremydmorris
Copy link
Contributor

The solution is to add an exception for TypeError. I just pushed the ds-upsert branch that includes this fix. Can you try it out and see if it works? I'll publish to pip in the next few days.

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

No branches or pull requests

2 participants