Comments (4)
Hi, thanks for the hint. I'll have a look at it.
Cheers, Markus
from nagios-http-json.
Thanks for your project, credits to https://stackoverflow.com/questions/40059654/python-convert-a-bytes-array-into-json-format
from nagios-http-json.
Hi,
is it possible you are running Python 3.5 (or older)? Because this should not be an issue with Python 3.6 and newer: https://docs.python.org/3/whatsnew/3.6.html#json
docker run -ti --rm python:3.6
Python 3.6.12 (default, Nov 18 2020, 14:46:32)
>>> import json
>>> json.loads('{"foo": 123}')
{'foo': 123}
>>> json.loads(b'{"foo": 123}')
{'foo': 123}
docker run -ti --rm python:3.5
Python 3.5.10 (default, Sep 10 2020, 18:30:47)
>>> import json
>>> json.loads('{"foo": 123}')
{'foo': 123}
>>> json.loads(b'{"foo": 123}')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python3.5/json/__init__.py", line 312, in loads
s.__class__.__name__))
TypeError: the JSON object must be str, not 'bytes'
Python 3.5 has reached its end-of-life, so I will update the supported versions ins the README accordingly.
from nagios-http-json.
Hello, you're right, I was running on Python 3.5, sorry for the wrong track,
from nagios-http-json.
Related Issues (20)
- Support Python 3 HOT 5
- OK results do not show Performance Data HOT 12
- Replace deprecated encodestring HOT 2
- Please add an argument to handle UNKNOWN as WARNING or CRITICAL HOT 5
- Using --key-equals with an empty list returns OK HOT 4
- Bug if array element is 0 HOT 3
- PERFDATA : nagios status code HOT 1
- Include API Method HOT 2
- translate working curl into correct attributes HOT 3
- Issue when selecting all keys HOT 2
- MicrosoftOnline Authentification HOT 1
- How to parse 0.0 values HOT 1
- 401 Unauthorized should not be OK HOT 2
- key with brackets () HOT 3
- Cannot set verify_mode to CERT_NONE when check_hostname is enabled. HOT 2
- Please add an optional parameter to mitigate unknown to critical HOT 3
- Enhanced plugin output without critical information HOT 7
- Please add an option to send an individual guid with every call and add - if set -add it to the output HOT 9
- Broken Makefile and lint test HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nagios-http-json.