Bug 2242845 - [abrt] did: __init__(): base.py:102:__init__:AttributeError: 'ConfigParser' object has no attribute 'readfp'. Did you mean: 'read'?
Summary: [abrt] did: __init__(): base.py:102:__init__:AttributeError: 'ConfigParser' o...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: did
Version: 39
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Petr Šplíchal
QA Contact: Fedora Extras Quality Assurance
URL: https://retrace.fedoraproject.org/faf...
Whiteboard: abrt_hash:281150867c50542d007531a8f1d...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-10-09 11:02 UTC by Karel Volný
Modified: 2023-11-14 01:45 UTC (History)
4 users (show)

Fixed In Version: did-0.21-1.fc39
Clone Of:
Environment:
Last Closed: 2023-11-14 01:45:19 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
File: os_info (687 bytes, text/plain)
2023-10-09 11:02 UTC, Karel Volný
no flags Details
File: environ (5.53 KB, text/plain)
2023-10-09 11:02 UTC, Karel Volný
no flags Details
File: mountinfo (2.86 KB, text/plain)
2023-10-09 11:02 UTC, Karel Volný
no flags Details
File: open_fds (572 bytes, text/plain)
2023-10-09 11:02 UTC, Karel Volný
no flags Details
File: namespaces (171 bytes, text/plain)
2023-10-09 11:02 UTC, Karel Volný
no flags Details
File: backtrace (740 bytes, text/plain)
2023-10-09 11:02 UTC, Karel Volný
no flags Details
File: cpuinfo (3.01 KB, text/plain)
2023-10-09 11:02 UTC, Karel Volný
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Github psss did issues 316 0 None closed Fedora 39 failure due to Python 3.12 changes 2023-10-09 13:08:01 UTC

Description Karel Volný 2023-10-09 11:02:13 UTC
Description of problem:
I've just upgraded to F39 and now did fails with this error ...

Version-Release number of selected component:
did-0.20-3.fc39

Additional info:
reporter:       libreport-2.17.11
kernel:         6.5.6-300.fc39.x86_64
cmdline:        /usr/bin/python3 -sP /usr/bin/did last week
cgroup:         0::/user.slice/user-1000.slice/user/app.slice/app-org.kde.konsole-00f5f5499cfb40019942cc1d6c1b452b.scope
uid:            1000
reason:         base.py:102:__init__:AttributeError: 'ConfigParser' object has no attribute 'readfp'. Did you mean: 'read'?
executable:     /usr/bin/did
type:           Python3
package:        did-0.20-3.fc39
runlevel:       N 5
exception_type: AttributeError
crash_function: __init__
interpreter:    python3-3.12.0-1.fc39.x86_64
comment:        I've just upgraded to F39 and now did fails with this error ...

Truncated backtrace:
base.py:102:__init__:AttributeError: 'ConfigParser' object has no attribute 'readfp'. Did you mean: 'read'?

Traceback (most recent call last):
  File "/usr/bin/did", line 42, in <module>
    did.cli.main()
  File "/usr/lib/python3.12/site-packages/did/cli.py", line 192, in main
    custom_plugins = did.base.Config().plugins
                     ^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/did/base.py", line 102, in __init__
    self.parser.readfp(codecs.open(path, "r", "utf8"))
    ^^^^^^^^^^^^^^^^^^
AttributeError: 'ConfigParser' object has no attribute 'readfp'. Did you mean: 'read'?

Local variables in innermost frame:
self: <did.base.Config object at 0x7f4a2c8290d0>
config: None
path: '/home/kvolny/.did/config'

Comment 1 Karel Volný 2023-10-09 11:02:17 UTC
Created attachment 1993077 [details]
File: os_info

Comment 2 Karel Volný 2023-10-09 11:02:18 UTC
Created attachment 1993078 [details]
File: environ

Comment 3 Karel Volný 2023-10-09 11:02:20 UTC
Created attachment 1993079 [details]
File: mountinfo

Comment 4 Karel Volný 2023-10-09 11:02:21 UTC
Created attachment 1993080 [details]
File: open_fds

Comment 5 Karel Volný 2023-10-09 11:02:23 UTC
Created attachment 1993081 [details]
File: namespaces

Comment 6 Karel Volný 2023-10-09 11:02:25 UTC
Created attachment 1993082 [details]
File: backtrace

Comment 7 Karel Volný 2023-10-09 11:02:27 UTC
Created attachment 1993083 [details]
File: cpuinfo

Comment 8 Petr Šplíchal 2023-10-20 08:16:07 UTC
Yeah, this has been fixed in https://github.com/psss/did/pull/313 and will be included in the next release. I'm planning a new release in the coming week(s). In the meantime you can use the fresh did version from the copr repo: https://copr.fedorainfracloud.org/coprs/psss/did/

Comment 9 Tomas Dolezal 2023-11-09 15:36:38 UTC
Sadly the package in COPR does not provide an upgrade path, so it will get lost as soon as my updates are installed again.

did-0.20-1.20231108152735322435.main.15.gb11caf1.fc39.noarch.rpm                                                                             2.2 MB/s | 166 kB     00:00    
Dependencies resolved.
=============================================================================================================================================================================
 Package                               Architecture              Version                                                               Repository                       Size
=============================================================================================================================================================================
Installing dependencies:
 python3-feedparser                    noarch                    6.0.10-6.fc39                                                         fedora                          164 k
 python3-sgmllib3k                     noarch                    1.0.0-11.fc39                                                         fedora                           22 k
Downgrading:
 did                                   noarch                    0.20-1.20231108152735322435.main.15.gb11caf1.fc39                     @commandline                    166 k

Transaction Summary
=============================================================================================================================================================================
Install    2 Packages
Downgrade  1 Package


Build taken from https://copr.fedorainfracloud.org/coprs/psss/did/build/6613018/

Comment 10 Tomas Dolezal 2023-11-09 15:41:25 UTC
installation via pip fails too
   package did 0.20.1, installed using Python 3.12.0
    - did

.local/pipx/venvs/did/bin/did --version                                                                                                                         ✘ 130 
Traceback (most recent call last):
  File "/home/todoleza/.local/pipx/venvs/did/bin/did", line 42, in <module>
    did.cli.main()
  File "/home/todoleza/.local/pipx/venvs/did/lib64/python3.12/site-packages/did/cli.py", line 192, in main
    custom_plugins = did.base.Config().plugins
                     ^^^^^^^^^^^^^^^^^
  File "/home/todoleza/.local/pipx/venvs/did/lib64/python3.12/site-packages/did/base.py", line 102, in __init__
    self.parser.readfp(codecs.open(path, "r", "utf8"))
    ^^^^^^^^^^^^^^^^^^
AttributeError: 'ConfigParser' object has no attribute 'readfp'. Did you mean: 'read'?


my system package version is same as in comment 0

Comment 11 Karel Volný 2023-11-13 13:29:26 UTC
thanks, the update fixes this
https://bodhi.fedoraproject.org/updates/FEDORA-2023-7a6d530263

(hm, how to link it with this bug?)

Comment 12 Fedora Update System 2023-11-13 13:33:35 UTC
FEDORA-2023-7a6d530263 has been submitted as an update to Fedora 39. https://bodhi.fedoraproject.org/updates/FEDORA-2023-7a6d530263

Comment 13 Petr Šplíchal 2023-11-13 13:34:42 UTC
I've added the bug to the bodhi update.

Comment 14 Petr Šplíchal 2023-11-13 13:36:30 UTC
(In reply to Tomas Dolezal from comment #9)
> Sadly the package in COPR does not provide an upgrade path, so
> it will get lost as soon as my updates are installed again.

Hm, the copr packages should be newer than what was in the Fedora
repo and the new release should be automatically picked up as it
has bumped version. What exactly is not working for you?

Comment 15 Petr Šplíchal 2023-11-13 13:42:03 UTC
Compared the latest release with the latest copr content and it seems as expected:

> rpmdev-vercmp did-0.21-1.fc37.noarch 0.21-1.20231110224527064887.main.1.g71e2580.fc37
WARNING: hyphen in release1: 0.21-1.fc37.noarch

rpmdev-vercmp <epoch1> <ver1> <release1> <epoch2> <ver2> <release2>
rpmdev-vercmp <EVR1> <EVR2>
rpmdev-vercmp # with no arguments, prompt

Exit status is 0 if the EVR's are equal, 11 if EVR1 is newer, and 12 if EVR2
is newer.  Other exit statuses indicate problems.

did-0.21-1.fc37.noarch < 0.21-1.20231110224527064887.main.1.g71e2580.fc37

Comment 16 Tomas Dolezal 2023-11-13 17:03:50 UTC
with testing repo it works as it should now :).
in the mean time I resorted to the copr & versionlock exclude for the fedora's 0.20-3.fc39 version.

(In reply to Petr Šplíchal from comment #14)
> Hm, the copr packages should be newer than what was in the Fedora
They weren't. See the last line of this comment.
> repo and the new release should be automatically picked up as it
> has bumped version. What exactly is not working for you?

$ rpmdev-vercmp did-0.20-3.fc39 did-0.20-1.20231108152735322435.main.15.gb11caf1.fc39.noarch.rpm                                                                   ✘ 11 
WARNING: hyphen in release1: 0.20-3.fc39
WARNING: hyphen in release2: 0.20-1.20231108152735322435.main.15.gb11caf1.fc39.noarch.rpm

rpmdev-vercmp <epoch1> <ver1> <release1> <epoch2> <ver2> <release2>
rpmdev-vercmp <EVR1> <EVR2>
rpmdev-vercmp # with no arguments, prompt

Exit status is 0 if the EVR's are equal, 11 if EVR1 is newer, and 12 if EVR2
is newer.  Other exit statuses indicate problems.

did-0.20-3.fc39 > did-0.20-1.20231108152735322435.main.15.gb11caf1.fc39.noarch.rpm

Comment 17 Petr Šplíchal 2023-11-13 21:21:25 UTC
Ah, I see, there were two automated release bumps on the dist-git side only. Will probably move to the same versioning/naming scheme as used by `tmt`. That should cover this case as well.

Comment 18 Fedora Update System 2023-11-14 01:45:19 UTC
FEDORA-2023-7a6d530263 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.