AllenInstitute/ipfx

nwb_to_pdf fails with MIES-generated NWB2 files

Opened this issue · 0 comments

The nwb_to_pdf converter fails with the following error when tested on any current NWB2 file saved from MIES. It seems that the acquisition description is filled with a placeholder, while a full json dataset is expected. I can upload test data if needed.

This isn't an urgent issue, but maybe @t-b could take a look and assess whether the issue is in the files or in the nwb_to_pdf utility at least?
This also may be an indication that the nwb_to_pdf utility would be more appropriately moved along with the x_to_nwb converters, as discussed in #492.

Traceback (most recent call last):
  File "/local1/storage/envs/ipfx3/lib/python3.7/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/local1/storage/envs/ipfx3/lib/python3.7/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/home/tom.chartrand/work/ipfx/ipfx/bin/nwb_to_pdf.py", line 453, in <module>
    main()
  File "/home/tom.chartrand/work/ipfx/ipfx/bin/nwb_to_pdf.py", line 449, in main
    create_regular_pdf(nwbfile, outfile)
  File "/home/tom.chartrand/work/ipfx/ipfx/bin/nwb_to_pdf.py", line 394, in create_regular_pdf
    sweeps = gather_sweeps(nwbfile)
  File "/home/tom.chartrand/work/ipfx/ipfx/bin/nwb_to_pdf.py", line 234, in gather_sweeps
    description = json.loads(acquisition.description)
  File "/local1/storage/envs/ipfx3/lib/python3.7/json/__init__.py", line 348, in loads
    return _default_decoder.decode(s)
  File "/local1/storage/envs/ipfx3/lib/python3.7/json/decoder.py", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/local1/storage/envs/ipfx3/lib/python3.7/json/decoder.py", line 355, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

Environment (please complete the following information):
Centos 7, python 3.7, IPFX 1.0.3