-
Notifications
You must be signed in to change notification settings - Fork 371
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
UTF-8 Encode/Decode Error Handling #505
Comments
@ashurack we are unable to reproduce the issue and were able to successfully upload the given csv file. below is the screenshot for the same Note- here we are using a Streaming CSC. No modification is being applied to the data read from the csv file. Request you to share your CSC if possible. Also do let us know if something is being missed from steps to reproducing the issue |
Looks like the csv file I uploaded is 100% valid UTF. I'll try to get a sample that will trigger the decoding issue this week. Message me on Splunk Slack in the meantime for more details. |
Hi @ashah-splunk, same error here (Splunk 9.0.1, Debian GNU/Linux 11, Python 3.7.11). Loading events from CSV doesn't work as expected (non UTF characters are parsed to UTF). I am using botsv3 dataset and getting the same problem as @ashurack using
|
@pabloperezj sorry for the delay in response. We were able to reproduce the issue using botsv3 dataset. Also during our verification we found that issue occurs only for certain specific non-utf8 characters. We are validating the change suggested by @ashurack and accordingly will make the changes in the SDK. We will update you know once we have a new SDK release available with the change. |
@ashurack ,@pabloperezj the fix is available in the latest Python SDK v1.7.4, request you to pull the latest SDK release. Please re-open the issue if the issue still persists. Thanks! |
Describe the bug
Custom search commands exception out when non UTF-8 event data is present in the search pipeline
To Reproduce
Expected behavior
splunk-sdk-python (and all other potentially impacted SDK's) should handle encoding/decoding in the same manner as Splunk Core.
Logs or Screenshots
Not working
broken_search.log
After patching six.py
Splunk (please complete the following information):
SDK (please complete the following information):
Additional context
My patch - to get my command working ASAP - was to change
errors='strict'
toerrors='replace'
here. I chose replace since it mimic's the functionality of Splunk. I didn't touch any other instances oferrors='strict'
and only tested this againstStreamingCommand
.This bug is not limited to the
inputlookup
command but it is the easiest way to reproduce.The text was updated successfully, but these errors were encountered: