Skip to content

JSONDecode Error with dataset containing CAN-Bus signals #15

@dominikdh

Description

@dominikdh

Hello,
as mentioned in the "README.md incorrect" issue, I have a problem with importing a dataset of an imc cronos measurement.
I get an JSONDecode Error (s. below). In the meantime I discovered, that the error only is raised, if the dataset contains CAN-Bus signals. If I remove them, I do not get this error.
But nevertheless, reading the data seems then only work for one channel - in all other channels the xdata and ydata are empty.

Please find below the error and attached an exemplary dataset.
Measurement.zip

---------------------------------------------------------------------------
JSONDecodeError                           Traceback (most recent call last)
Input In [18], in <cell line: 1>()
----> 1 data = raw.get_channels(True)

File IMCtermite.pyx:25, in IMCtermite.imctermite.get_channels()

File ~\.conda\envs\myAnaconda\lib\json\__init__.py:346, in loads(s, cls, object_hook, parse_float, parse_int, parse_constant, object_pairs_hook, **kw)
    341     s = s.decode(detect_encoding(s), 'surrogatepass')
    343 if (cls is None and object_hook is None and
    344         parse_int is None and parse_float is None and
    345         parse_constant is None and object_pairs_hook is None and not kw):
--> 346     return _default_decoder.decode(s)
    347 if cls is None:
    348     cls = JSONDecoder

File ~\.conda\envs\myAnaconda\lib\json\decoder.py:337, in JSONDecoder.decode(self, s, _w)
    332 def decode(self, s, _w=WHITESPACE.match):
    333     """Return the Python representation of ``s`` (a ``str`` instance
    334     containing a JSON document).
    335 
    336     """
--> 337     obj, end = self.raw_decode(s, idx=_w(s, 0).end())
    338     end = _w(s, end).end()
    339     if end != len(s):

File ~\.conda\envs\myAnaconda\lib\json\decoder.py:355, in JSONDecoder.raw_decode(self, s, idx)
    353     obj, end = self.scan_once(s, idx)
    354 except StopIteration as err:
--> 355     raise JSONDecodeError("Expecting value", s, err.value) from None
    356 return obj, end

JSONDecodeError: Expecting value: line 1 column 400 (char 399)
[Measurement.zip](https://github.com/RecordEvolution/IMCtermite/files/9615982/Measurement.zip)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions