pieper / chronicle Goto Github PK
View Code? Open in Web Editor NEWAn ordered record of events and data
License: Other
An ordered record of events and data
License: Other
What about these ones:
Hi,
I'm getting this error when I try to upload my dicom images to couchdb:
"TypeError: Object of type MultiValue is not JSON serializable"
What I've done:
./bin/record.py <path to dicom data>
Offending line:
couchdb.json.encode(value).encode('utf-8')
My first try at fixing this was to use this advice for casting a MultiValue object to a list:
https://bitbucket.org/openrem/openrem/issues/803
Example:
self.modalities_in_study = json.dumps(x)
Into
self.modalities_in_study = json.dumps(list(x))
Now in this example it was (approx. line: 100 inside a try block):
if isinstance(value, pydicom.multival.MultiValue):
couchdb.json.encode(list(value)).encode('utf-8')
else:
couchdb.json.encode(value).encode('utf-8')
This works for a bit but feels hacky. It works until we get to line ~262:
doc_id, doc_rev = self.db.save(document)
I've even printed the data to be saved as a document and it's a simple dictionary:
...
I don't feel like I should have to edit "couchdb", "json" or "pydicom" to get this to work. Is there something with record.py that I"m configuring wrong? Could it be our data?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.