Closed lowell80 closed 4 years ago
BTW, I just hit this with another TA I've written. Has anyone else had issues like this?
Hi @lowell80, this seems like an oversight in our testing. We're open to pull requests, however we do not have the bandwidth to address this issue at the moment. Thank you for your patience and understanding
I just started writing my first TA and this issue caused me to waste hours. First thing anyone does when they start fresh is download the latest SDK version and work with that. Being new to the SDK there are a lot of things for me to learn and I never thought that the SDK would contain a bug like this, so assumed it was my script. Anyone doing something intelligent with a modular input and importing splunklib would run into this so please prioritise this issue or add it as a known issue on the releases page.
@Bakermat We have a fix in progress in #319, however it is blocked on some CI enhancements. Thank you for your patience, we are aware of the frustration this may be causing you
Very sorry for your frustration @Bakermat, we should have publicized that issue more broadly once we verified it. I have taken your suggestion and added it to the known issues for the release here: https://github.com/splunk/splunk-sdk-python/releases/tag/1.6.12
Thanks!
I am also facing the same issue for my TA while using python 2 interpreter.
Below is the traceback from the 1.6.12 version from a local 8 instance running on a linux:
Traceback (most recent call last): File "/root/codebase/splunk/splunk_ta/bin/main.py", line 53, in
ew = EventWriter() File "/root/codebase/splunk/splunk_ta/bin/splunklib/modularinput/event_writer.py", line 49, in init self._out = TextIOWrapper(output) AttributeError: 'file' object has no attribute 'readable'
We have released a fix in v1.6.13 https://github.com/splunk/splunk-sdk-python/releases/tag/1.6.13 but please let us know if you continue to see similar issues.
I think I stumbled onto a bug in 1.6.12 that impacts at least 7.1.4 and 7.3.0. It seems to be related to python 2 vs 3 and athe TextIOWrapper around the output stream. The initial registration seems to be fine (
--scheme
), but whenever the script is run to collect data that's when it fails.When I downgrade splunk-sdk version to 1.6.11 my modular input (TA) works fine again.
Here's the traceback from the 1.6.12 version from a local 7.3 instance running on a Mac: