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

Error running query: datetime.time(13, 52, 27) is not JSON serializable #463

Closed
SomeKittens opened this issue Jun 28, 2015 · 4 comments
Closed

Comments

@SomeKittens
Copy link

My table schema:

CREATE TABLE F_entrances (
  id SERIAL PRIMARY KEY,
  timeOfEntrance time,
  customerId int REFERENCES D_customers
);

(and yes, I committed the horrible sin of camel_case vs underScore. I'll be fixing that soonish)

The query

SELECT
timeofentrance
FROM F_entrances

Gives me the error Error running query: datetime.time(13, 52, 27) is not JSON serializable. I worked around it with to_char but this seems to be a problem at the Python layer.

@arikfr
Copy link
Member

arikfr commented Jun 28, 2015

It's definitely is. What datasource type are you using?

@arikfr
Copy link
Member

arikfr commented Jun 28, 2015

Ok, I believe I know where the problem is. Expect a fix tomorrow.

On Sunday, June 28, 2015, Randall Koutnik notifications@github.com wrote:

My table schema:

CREATE TABLE F_entrances (
id SERIAL PRIMARY KEY,
timeOfEntrance time,
customerId int REFERENCES D_customers
);

(and yes, I committed the horrible sin of camel_case vs underScore. I'll
be fixing that soonish)

The query

SELECT
timeofentranceFROM F_entrances

Gives me the error Error running query: datetime.time(13, 52, 27) is not
JSON serializable. I worked around it with to_char but this seems to be a
problem at the Python layer http://stackoverflow.com/a/11875813/1216976.


Reply to this email directly or view it on GitHub
#463.

@SomeKittens
Copy link
Author

I'm using postgres here. Thanks for the quick response!

@arikfr arikfr closed this as completed in 98ff701 Jun 29, 2015
@arikfr
Copy link
Member

arikfr commented Jun 29, 2015

Fixed this in #464 and it's part of the 0.6.1-RC release. See details on how to upgrade here.

There is still some room for improvement in the UI (time columns treated as plain strings), but at least it will return results now.

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