Bug 2223526 - sos immediately crashes: Could not initialize 'report': 'ConfigParser' object has no attribute 'readfp'
Summary: sos immediately crashes: Could not initialize 'report': 'ConfigParser' object...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: sos
Version: rawhide
Hardware: All
OS: Linux
high
urgent
Target Milestone: ---
Assignee: Sandro Bonazzola
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: CockpitTest
Depends On:
Blocks: 2224676
TreeView+ depends on / blocked
 
Reported: 2023-07-18 06:18 UTC by Martin Pitt
Modified: 2023-07-24 06:14 UTC (History)
4 users (show)

Fixed In Version: sos-4.5.6-1.fc39
Doc Type: Bug Fix
Doc Text:
Cause: in Python 3.12 configparser.ConfigParser no longer has a readfp method. Consequence: sos report crashes due to the missing function. Fix: Use read_file() instead. Result: sos report works as expected
Clone Of:
Environment:
Last Closed: 2023-07-24 06:14:58 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github sosreport sos issues 3308 0 None open python 3.12: sos crashes because of `ConfigParser` 2023-07-18 06:26:08 UTC
Github sosreport sos pull 3309 0 None open [options] compatibility fix for python 3.12 2023-07-18 07:06:48 UTC

Description Martin Pitt 2023-07-18 06:18:12 UTC
This is apparently fallout from the Python 3.12 transition, similar to bug 2176174 and bug 2221311.

Reproducible: Always

Steps to Reproduce:
sos report
Actual Results:  
Could not initialize 'report': 'ConfigParser' object has no attribute 'readfp'

sos-4.5.5-2.fc39.noarch

Comment 1 Sandro Bonazzola 2023-07-18 06:26:08 UTC
Reported upstream to https://github.com/sosreport/sos/issues/3308

Comment 2 Sandro Bonazzola 2023-07-18 07:06:48 UTC
Pushed a fix: https://github.com/sosreport/sos/pull/3309

Comment 3 Sandro Bonazzola 2023-07-18 07:46:36 UTC
Martin is this issue blocking something? Is a rebuild with the fix needed urgently or can it wait till next sos release (which should happen soon, around the end of July)?

Comment 4 Martin Pitt 2023-07-18 08:17:03 UTC
Sandro: Not for me personally, or for cockpit. I created a "naughty pattern" and a tracker in https://github.com/cockpit-project/bots/issues/5016 so that it doesn't block our tests, which "shuts it up". However, I don't have a good gut feeling how many people (try to) use sos in Rawhide. Thanks!

Comment 5 Sandro Bonazzola 2023-07-18 08:40:41 UTC
Ok, so I'll try get the patch merged upstream and included in next upstream release.

Comment 6 Jose Castillo 2023-07-18 09:45:18 UTC
I've ack'ed the PR upstream, so hopefully when Jake comes online he approves and merges it, in time for 4.5.6

Comment 7 Fedora Update System 2023-07-24 06:12:23 UTC
FEDORA-2023-93a10ee1a9 has been submitted as an update to Fedora 39. https://bodhi.fedoraproject.org/updates/FEDORA-2023-93a10ee1a9

Comment 8 Fedora Update System 2023-07-24 06:14:58 UTC
FEDORA-2023-93a10ee1a9 has been pushed to the Fedora 39 stable repository.
If problem still persists, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.