Addon error: Traceback (most recent call last):


 "mitmproxy\addons\view.py", line 571, in response


 "mitmproxy\addons\view.py", line 612, in update


 "blinker\base.py", line 266, in send


 "blinker\base.py", line 266, in <listcomp>


 "mitmproxy\tools\web\master.py", line 57, in _sig_view_update


 "mitmproxy\tools\web\app.py", line 214, in broadcast


 "json\__init__.py", line 234, in dumps


 "json\encoder.py", line 199, in encode


 "json\encoder.py", line 257, in iterencode


 "json\encoder.py", line 179, in default
TypeError: Object of type bytes is not JSON serializable

Original Traceback (most recent call last):


 "/path/to/home/dir/.conda/envs/contrastive/lib/python3.7/site-packages/torch/utils/data/_utils/worker.py", line 185, in _worker_loop

data = fetcher.fetch(index)


 "/path/to/home/dir/.conda/envs/contrastive/lib/python3.7/site-packages/torch/utils/data/_utils/fetch.py", line 44, in fetch

data = [self.dataset[idx] for idx in possibly_batched_index]


 "/path/to/home/dir/.conda/envs/contrastive/lib/python3.7/site-packages/torch/utils/data/_utils/fetch.py", line 44, in <listcomp>

data = [self.dataset[idx] for idx in possibly_batched_index]


 "/path/to/home/dir/.conda/envs/contrastive/lib/python3.7/site-packages/torchvision/datasets/cifar.py", line 120, in __getitem__

img = self.transform(img)


 "/path/to/home/dir/.conda/envs/contrastive/lib/python3.7/site-packages/torchvision/transforms/transforms.py", line 54, in __call__

img = t(img)


 "/path/to/home/dir/.conda/envs/contrastive/lib/python3.7/site-packages/torch/nn/modules/module.py", line 727, in _call_impl

result = self.forward(*input, **kwargs)


 "/path/to/home/dir/.conda/envs/contrastive/lib/python3.7/site-packages/torchvision/transforms/transforms.py", line 1092, in forward

img = F.adjust_hue(img, hue_factor)


 "/path/to/home/dir/.conda/envs/contrastive/lib/python3.7/site-packages/torchvision/transforms/functional.py", line 728, in adjust_hue

raise TypeError('img should be PIL Image. Got {}'.format(type(img)))
TypeError: img should be PIL Image. Got <class 'torch.Tensor'>
