# Buggy code
def build(self, class_config, crs_transformer, extent, tmp_dir):
    return SemanticSegmentationLabelStore(
        self.uri,
        extent,
        crs_transformer,
        tmp_dir,
        vector_output=self.vector_output,
        class_config=class_config,
    )


# Traceback (json.decoder.JSONDecodeError)

17:55:54
2019-10-01 17:55:54:rastervision.utils.files: INFO - Downloading s3://raster-vision-lf-dev/examples/test-output/21/spacenet-vegas-buildings-semantic-segmentation-pytorch/predict/buildings-semantic_segmentation/5058.tif to /opt/data/temp/tmp5903c076/tmpk2r7cdga/s3/raster-vision-lf-dev/examples/test-output/21/spacenet-vegas-buildings-semantic-segmentation-pytorch/predict/buildings-semantic_segmentat
2019-10-01 17:55:54:rastervision.utils.files: INFO - Downloading s3://raster-vision-lf-dev/examples/test-output/21/spacenet-vegas-buildings-semantic-segmentation-pytorch/predict/buildings-semantic_segmentation/5058.tif to /opt/data/temp/tmp5903c076/tmpk2r7cdga/s3/raster-vision-lf-dev/examples/test-output/21/spacenet-vegas-buildings-semantic-segmentation-pytorch/predict/buildings-semantic_segmentation/5058.tif

17:55:56
Traceback (most recent call last):

17:55:56
File "/opt/conda/lib/python3.6/runpy.py", line 193, in _run_module_as_main

17:55:56
"__main__", mod_spec)

17:55:56
File "/opt/conda/lib/python3.6/runpy.py", line 85, in _run_code

17:55:56
exec(code, run_globals)

17:55:56
File "/opt/src/rastervision/__main__.py", line 17, in <module>

17:55:56
rv.main()

17:55:56
File "/opt/conda/lib/python3.6/site-packages/click/core.py", line 722, in __call__

17:55:56
return self.main(*args, **kwargs)

17:55:56
File "/opt/conda/lib/python3.6/site-packages/click/core.py", line 697, in main

17:55:56
rv = self.invoke(ctx)

17:55:56
File "/opt/conda/lib/python3.6/site-packages/click/core.py", line 1066, in invoke

17:55:56
return _process_result(sub_ctx.command.invoke(sub_ctx))

17:55:56
File "/opt/conda/lib/python3.6/site-packages/click/core.py", line 895, in invoke

17:55:56
return ctx.invoke(self.callback, **ctx.params)

17:55:56
File "/opt/conda/lib/python3.6/site-packages/click/core.py", line 535, in invoke

17:55:56
return callback(*args, **kwargs)

17:55:56
File "/opt/src/rastervision/cli/main.py", line 294, in run_command

17:55:56
rv.runner.CommandRunner.run(command_config_uri)

17:55:56
File "/opt/src/rastervision/runner/command_runner.py", line 11, in run

17:55:56
CommandRunner.run_from_proto(msg)

17:55:56
File "/opt/src/rastervision/runner/command_runner.py", line 17, in run_from_proto

17:55:56
command.run()

17:55:56
File "/opt/src/rastervision/command/eval_command.py", line 24, in run

17:55:56
evaluator.process(scenes, tmp_dir)

17:55:56
File "/opt/src/rastervision/evaluation/semantic_segmentation_evaluator.py", line 75, in process

17:55:56
pred_geojson = pred_geojson_source.get_geojson()

17:55:56
File "/opt/src/rastervision/data/vector_source/vector_source.py", line 153, in get_geojson

17:55:56
self.geojson = self._get_geojson()

17:55:56
File "/opt/src/rastervision/data/vector_source/geojson_vector_source.py", line 25, in _get_geojson

17:55:56
geojson = json.loads(file_to_str(self.uri))

17:55:56
File "/opt/conda/lib/python3.6/json/__init__.py", line 354, in loads

17:55:56
return _default_decoder.decode(s)

17:55:56
File "/opt/conda/lib/python3.6/json/decoder.py", line 339, in decode

17:55:56
obj, end = self.raw_decode(s, idx=_w(s, 0).end())

17:55:56
File "/opt/conda/lib/python3.6/json/decoder.py", line 357, in raw_decode

17:55:56
raise JSONDecodeError("Expecting value", s, err.value) from None

17:55:56
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

# Fixed code
def build(self, class_config, crs_transformer, extent, tmp_dir):
    return SemanticSegmentationLabelStore(
        self.uri,
        extent,
        crs_transformer,
        tmp_dir,
        vector_output=self.vector_output,
        class_config=class_config if self.rgb else None,
    )