TextIOWrapper regression bug in 1.6.12: 'file' object has no attribute 'readable'
See original GitHub issueI 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:
Traceback (most recent call last):
File "/Users/lalleman/splunk73/splunk/etc/apps/TA-oam_dms/bin/OAM_DMS.py", line 422, in <module>
sys.exit(OamDmsModularInput().run(sys.argv))
File "/Users/lalleman/splunk73/splunk/etc/apps/TA-oam_dms/bin/../lib/splunklib/modularinput/script.py", line 56, in run
return self.run_script(args, EventWriter(), sys.stdin)
File "/Users/lalleman/splunk73/splunk/etc/apps/TA-oam_dms/bin/../lib/splunklib/modularinput/event_writer.py", line 49, in __init__
self._out = TextIOWrapper(output)
AttributeError: 'file' object has no attribute 'readable'
Issue Analytics
- State:
- Created 4 years ago
- Comments:8 (5 by maintainers)
Top Results From Across the Web
'_io.TextIOWrapper' object has no attribute 'next' python
There's two reasons you're running into issues here. The first is that you've created fo in write-only mode. You need a file object...
Read more >'file' object has no attribute 'readable' - Debian Bug report logs
TextIOWrapper(stream, encoding=encoding) > AttributeError: 'file' object has no attribute 'readable' > gpg: Signature made Sat 03 Sep 2016 ...
Read more >AttributeError: '_io.TextIOWrapper' object has no attribute 'items'
TextIOWrapper ' object has no attribute 'items'. I 'm trying to unpack the keys and the values of a yaml file. This is...
Read more >List of messages - Issue Tracker - Python.org
TextIOWrapper ' object has no attribute '__dict__' It should be noted that it ... to pickle a file object is unfortunate, and is...
Read more >'file' object has no attribute 'writeline' - Python Forum
I want to remove these lines and then import the rest of the files into a NoSQL database. but I'm getting the error...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
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
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.