Error writing metadata to JSON
Summary
Error when running the system to store each frame with corresponding JSON on disk
Steps to reproduce
Run the system with the following set in settings.json:
"output": {
"path": "output",
"output_mode": 0,
"output_format": 1,
"device_id": 0
}
What is the current bug behaviour?
Traceback (most recent call last):
File ".../python3.7/multiprocessing/process.py", line 297, in _bootstrap
self.run()
File ".../python3.7/multiprocessing/process.py", line 99, in run
self._target(*self._args, **self._kwargs)
File ".../DynAIkonTrap/comms.py", line 180, in _read_frames
self.output_still(image=frame.image, time=frame.timestamp)
File ".../DynAIkonTrap/comms.py", line 348, in output_still
dump(meta, f)
File ".../python3.7/json/__init__.py", line 180, in dump
fp.write(chunk)
TypeError: a bytes-like object is required, not 'str'
Possible fixes
Line 346 in comms.py opens the file with the binary flag, when it should not.