Cryosparc cluster connect > JSONDecodeError

Hello users
Please help: I am trying to “cryosparc cluster connect”, but I get the error below.

My cryosparc is up to date. I tried restarting cryosparc - there seems to be no problem, no errors reported with the master or worker up to the point of the connect command. I found another post when I did a search in this database for “JSONDecodeError”, but I don’t think that was related, because that was about command_rtp problems. I did not paste my cluster_info.json and file, as I don’t think that is the problem for the following reason: I initially thought there was a syntax problem with my cluster_info.json file, so I used pasted the content from website’s SLURM example, and it gave me the exact same error. I would be happy to follow up with more information.

[cryosparc]$ cryosparc_master/bin/cryosparcm cluster connect
Traceback (most recent call last):
File “”, line 5, in
File “/path/cryosparc_master/deps/anaconda/envs/cryosparc_master_env/lib/python3.7/json/”, line 296, in load
parse_constant=parse_constant, object_pairs_hook=object_pairs_hook, **kw)
File “/path/cryosparc_master/deps/anaconda/envs/cryosparc_master_env/lib/python3.7/json/”, line 348, in loads
return _default_decoder.decode(s)
File “/path/cryosparc_master/deps/anaconda/envs/cryosparc_master_env/lib/python3.7/json/”, line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File “/path/cryosparc_master/deps/anaconda/envs/cryosparc_master_env/lib/python3.7/json/”, line 355, in raw_decode
raise JSONDecodeError(“Expecting value”, s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

Hi aapeters,

I am not a cryosparc team member, but I use python a lot, and that traceback is indicative of a syntax error in the .json file. The copy paste might have introduced invisible special whitespace, or file terminators.
Just to be sure that it is not the case, use

cryosparcm cluster example slurm

to create example cluster_info.json and files in the current folder. Update those with your configuration and try to reconnect?

Thank you Andrea. I figured it out. The problem IS the example. In the json file generated by “…cluster example slurm”, line 4 does not end in a comma. Your input was valuable.

Hi @Andrea, @aapeters,

Thank you for reporting this. The example .json output will be fixed.