Getting Data In

TypeError: Object of type bytes is not JSON serializable

VijaySrrie
Builder

In Python script I get a below error in internal logs

TypeError: Object of type bytes is not JSON serializable

We are using python 3
May I know how to get rid of this error in internal logs?

 

Labels (3)
0 Karma

PickleRick
SplunkTrust
SplunkTrust

This is an error resulting from the python code trying to do somethin it's not supposed to. In this case - it's trying to serialize to json an object which is not serializable (not all classes can be serialized).

Why it happens? We don't know - you should look in your logs for indication where this exception is triggered.

VatsalJagani
SplunkTrust
SplunkTrust

@VijaySrrie - two questions?

  • Is it causing any problems in the Splunk environment currently??
  • Which script / Add-on / App is generating this error??

 

0 Karma

VijaySrrie
Builder

@VatsalJagani 
1. Duplicate logs are ingested into splunk, we tried to change the checkpoint file value, even after that at 2 am duplicated are ingested
2. We are using python script to ingest TYK mongoDB logs into splunk

0 Karma

VijaySrrie
Builder

Hi @VatsalJagani 
1. Checkpoint file is not getting update
2. It happens only in DC1
3.  modinput_tyk_analytics_mongodb is the app having the python script

4. Whenever we see error in splunk internal logs, duplicate logs are seen

0 Karma

VatsalJagani
SplunkTrust
SplunkTrust

@VijaySrrie - I cannot tell by the name of the App who is the creator of the App, but you need to reach out to developer of that App and raise support case there.

Get Updates on the Splunk Community!

Dashboards: Hiding charts while search is being executed and other uses for tokens

There are a couple of features of SimpleXML / Classic dashboards that can be used to enhance the user ...

Splunk Observability Cloud's AI Assistant in Action Series: Explaining Metrics and ...

This is the fourth post in the Splunk Observability Cloud’s AI Assistant in Action series that digs into how ...

Brains, Bytes, and Boston: Learn from the Best at .conf25

When you think of Boston, you might picture colonial charm, world-class universities, or even the crack of a ...