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

ValueError: No JSON object could be decoded #5

Open
avin-tokade opened this issue Jan 9, 2020 · 1 comment
Open

ValueError: No JSON object could be decoded #5

avin-tokade opened this issue Jan 9, 2020 · 1 comment

Comments

@avin-tokade
Copy link

Hello ,

How to resolve below issue ?

[root@IN-MON-AP1 plugins]# ./check_unity.py -H 10.20.0.x -m battery -u icinga -p mypass
/usr/lib/python2.7/site-packages/urllib3/connectionpool.py:769: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.org/en/latest/security.html
InsecureRequestWarning)
Traceback (most recent call last):
File "./check_unity.py", line 573, in
main()
File "./check_unity.py", line 526, in main
value, descid, desc = getBattery(hostaddress, token, cookie)
File "./check_unity.py", line 110, in getBattery
j = json.loads(r.text)
File "/usr/lib64/python2.7/json/init.py", line 338, in loads
return _default_decoder.decode(s)
File "/usr/lib64/python2.7/json/decoder.py", line 366, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/lib64/python2.7/json/decoder.py", line 384, in raw_decode
raise ValueError("No JSON object could be decoded")
ValueError: No JSON object could be decoded

@avin-tokade
Copy link
Author

Does anyone have any idea about how to fix this ?

My System details
[root@ICINGA ~]# python -V
Python 2.7.5
[root@ICINGA ~]# cat /etc/redhat-release
Red Hat Enterprise Linux Server release 7.6 (Maipo)

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