az-deep-batch-score icon indicating copy to clipboard operation
az-deep-batch-score copied to clipboard

check-quota function error

Open daden-ms opened this issue 7 years ago • 3 comments


JSONDecodeError Traceback (most recent call last) in () 3 requested_cores = ffmpeg_node_count * vm_dict[vm_family]["cores"] 4 ----> 5 diff = check_quota(vm_family) 6 if diff <= requested_cores: 7 print("Not enough cores of DSv3 in region, asking for {} but have {}".format(requested_cores, diff))

in check_quota(vm_family) 19 "--query", "[?contains(localName, '%s')].{max:limit, current:currentValue}" % (vm_family) 20 ], stdout=subprocess.PIPE) ---> 21 quota = json.loads(''.join(results.stdout.decode('utf-8'))) 22 return int(quota[0]['max']) - int(quota[0]['current'])

~/anaconda3/envs/batchscoringdl_aml/lib/python3.6/json/init.py in loads(s, encoding, cls, object_hook, parse_float, parse_int, parse_constant, object_pairs_hook, **kw) 352 parse_int is None and parse_float is None and 353 parse_constant is None and object_pairs_hook is None and not kw): --> 354 return _default_decoder.decode(s) 355 if cls is None: 356 cls = JSONDecoder

~/anaconda3/envs/batchscoringdl_aml/lib/python3.6/json/decoder.py in decode(self, s, _w) 337 338 """ --> 339 obj, end = self.raw_decode(s, idx=_w(s, 0).end()) 340 end = _w(s, end).end() 341 if end != len(s):

~/anaconda3/envs/batchscoringdl_aml/lib/python3.6/json/decoder.py in raw_decode(self, s, idx) 355 obj, end = self.scan_once(s, idx) 356 except StopIteration as err: --> 357 raise JSONDecodeError("Expecting value", s, err.value) from None 358 return obj, end

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

daden-ms avatar Jan 28 '19 17:01 daden-ms

can't replicate. can you upgrade cli to 2.0.49 and try again. not sure from the error message but this 19 "--query", "[?contains(localName, '%s')].{max:limit, current:currentValue}" % (vm_family) makes it look like its somehow calling the cli...

jiata avatar Jan 30 '19 05:01 jiata

actually i think it is because the .env file might be malformed? can you check cat .env and verify?

jiata avatar Feb 04 '19 16:02 jiata

@daden-ms following up

jiata avatar Feb 07 '19 13:02 jiata