diffpy / sampledb

A DB for sample and synthesis metadata information
http://www.diffpy.org/sampledb/
Other
0 stars 2 forks source link

Error with download samples #54

Closed CJ-Wright closed 6 years ago

CJ-Wright commented 6 years ago
(dp_dev) christopher@christopher-ubuntu ~/test_sampledb $ download_samples test.xlsx
Traceback (most recent call last):
  File "/home/christopher/mc/envs/dp_dev/bin/download_samples", line 6, in <module>
    exec(compile(open(__file__).read(), __file__, 'exec'))
  File "/home/christopher/dev/sampledb-1/scripts/download_samples", line 3, in <module>
    download_samples()
  File "/home/christopher/dev/sampledb-1/sampledb/reader.xsh", line 192, in download_samples
    args.collection, args.key, args.user, args.port)
  File "/home/christopher/dev/sampledb-1/sampledb/reader.xsh", line 142, in download_sample_spreadsheet
    download(filename, sdb)
  File "/home/christopher/dev/sampledb-1/sampledb/reader.xsh", line 123, in download
    schema = json.loads(schema)
  File "/home/christopher/mc/envs/dp_dev/lib/python3.5/json/__init__.py", line 312, in loads
    s.__class__.__name__))
TypeError: the JSON object must be str, not 'bytes'
justcalamari commented 6 years ago

Interesting, I never got this error. What version of json are you using?

CJ-Wright commented 6 years ago

Json is shipped with python.