Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JSONDecodeError: Expecting value: line 1 column 1 (char 0) #6

Open
rakesh-kumar-k opened this issue Apr 29, 2021 · 0 comments
Open

Comments

@rakesh-kumar-k
Copy link

1 # Load validation dataset
2 dataset = final.CustomDataset()
----> 3 dataset.load_custom(CUSTOM_DIR, "val")
4
5 # Must call before using the dataset

~\Documents\wastedata-Mask_RCNN-multiple-classes-master\final.py in load_custom(self, dataset_dir, subset)
108 # }
109 # We mostly care about the x and y coordinates of each region
--> 110 annotations1 = json.load(open(r"C:\Users\Rakesh Kumar\Documents\wastedata-Mask_RCNN-multiple-classes-master\main\dataset\val\via_region_data.json"))
111 # print(annotations1)
112 annotations = list(annotations1.values()) # don't need the dict keys

~\anaconda3\lib\json_init_.py in load(fp, cls, object_hook, parse_float, parse_int, parse_constant, object_pairs_hook, **kw)
291 kwarg; otherwise JSONDecoder is used.
292 """
--> 293 return loads(fp.read(),
294 cls=cls, object_hook=object_hook,
295 parse_float=parse_float, parse_int=parse_int,

~\anaconda3\lib\json_init_.py in loads(s, cls, object_hook, parse_float, parse_int, parse_constant, object_pairs_hook, **kw)
355 parse_int is None and parse_float is None and
356 parse_constant is None and object_pairs_hook is None and not kw):
--> 357 return _default_decoder.decode(s)
358 if cls is None:
359 cls = JSONDecoder

~\anaconda3\lib\json\decoder.py in decode(self, s, _w)
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):

~\anaconda3\lib\json\decoder.py in 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 1 (char 0)

Tried all json methods but no use, plz help if you get any idea

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant