Azure / azure-cli

Azure Command-Line Interface
MIT License
4.01k stars 2.98k forks source link

Az role definition python libary error #8582

Closed tpetkovic closed 3 years ago

tpetkovic commented 5 years ago

When creating an custom role on the azure-cli on the portal I receive python libary errors, this has been replicated on other colleagues devices within the team and they receive the exact same issue. I can also send the contents of the JSON file when engaged with a microsoft support engineer. It contains the same layout as the vmoperator.json on your how-to page. https://docs.microsoft.com/en-us/azure/role-based-access-control/custom-roles-cli

xxxxx@Azure:~$ az role definition create --role-definition /home/xxxx/xxxxxxxxxxx.json malformed node or string: <_ast.Name object at 0x7fc72cb13588> Traceback (most recent call last): File "/opt/az/lib/python3.6/site-packages/azure/cli/core/util.py", line 218, in shell_safe_json_parse return json.loads(json_or_dict_string) File "/opt/az/lib/python3.6/json/init.py", line 354, in loads return _default_decoder.decode(s) File "/opt/az/lib/python3.6/json/decoder.py", line 339, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) File "/opt/az/lib/python3.6/json/decoder.py", line 357, in raw_decode raise JSONDecodeError("Expecting value", s, err.value) from None json.decoder.JSONDecodeError: Expecting value: line 7 column 3 (char 193)

marstr commented 5 years ago

Howdy @tpetkovic, given that this issue is regarding a JSON parsing problem, we'll definitely need a way of understanding the contents of your role definition. If you're comfortable sharing via email, you can send it to me at marstr@micrsoft.com.

tjprescott commented 5 years ago

Sounds like it might be similar to #8456.

yonzhan commented 4 years ago

add to S164.

arrownj commented 4 years ago

Hi @tpetkovic , is this issue still valid ? It seems that your json file wasn't parsing well , could you please also paste your json content here ? Thanks

ghost commented 3 years ago

Hi, we're sending this friendly reminder because we haven't heard back from you in a while. We need more information about this issue to help address it. Please be sure to give us your input within the next 7 days. If we don't hear back from you within 14 days of this comment the issue will be automatically closed. Thank you!

yungezz commented 3 years ago

hi @tpetkovic is there any update on json file validation? Would like to close the issue for now since no response for a while. Feel free to create a new issue if met any other error. thanks.