Skip to content
This repository has been archived by the owner on May 29, 2024. It is now read-only.

Items with timedelta values are not export/importable as JSON #34

Open
toirl opened this issue Oct 26, 2016 · 0 comments
Open

Items with timedelta values are not export/importable as JSON #34

toirl opened this issue Oct 26, 2016 · 0 comments
Labels

Comments

@toirl
Copy link
Member

toirl commented Oct 26, 2016

Timedelatas are not JSON serialisable on default and Ringo does not support to serialise these values yet.

So If you try to export items having a timedelta values using the ringo-admin command:

ringo-admin db savedata items

it will result in

File "/home/torsten/Entwicklung/ringo-apps/trainable/lib/ringo/ringo/lib/imexport.py", line 37, in default
    return json.JSONEncoder.default(self, obj)
  File "/usr/lib/python2.7/json/encoder.py", line 184, in default
    raise TypeError(repr(o) + " is not JSON serializable")
TypeError: datetime.timedelta(0, 818) is not JSON serializable
@toirl toirl added the bug label Oct 26, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

1 participant