AttributeError: module 'configparser' has no attribute 'SafeConfigParser'

Open Beginner friendly
#2,066 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
65/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Stale
Tech stack
python
Domain
cli

Research direction

Start in mackup/config.py at _setup_parser, where the traceback shows the failure while constructing the parser. Reproduce the issue with Python 3.13 by running mackup list, then verify the compatibility change by confirming that the command starts without the AttributeError and produces its normal listing.

Written by the indexing model from the issue text.

Description

$ mackup list
Traceback (most recent call last):
  File "/usr/bin/mackup", line 33, in <module>
    sys.exit(load_entry_point('mackup==0.8.32', 'console_scripts', 'mackup')())
             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
  File "/usr/lib/python3.13/site-packages/mackup/main.py", line 66, in main
    mckp = Mackup()
  File "/usr/lib/python3.13/site-packages/mackup/mackup.py", line 24, in __init__
    self._config = config.Config()
                   ~~~~~~~~~~~~~^^
  File "/usr/lib/python3.13/site-packages/mackup/config.py", line 46, in __init__
    self._parser = self._setup_parser(filename)
                   ~~~~~~~~~~~~~~~~~~^^^^^^^^^^
  File "/usr/lib/python3.13/site-packages/mackup/config.py", line 150, in _setup_parser
    parser = configparser.SafeConfigParser(allow_no_value=True)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: module 'configparser' has no attribute 'SafeConfigParser'. Did you mean: 'RawConfigParser'?

$ dnf5 info  mackup -C
Updating and loading repositories:
Repositories loaded.
Installed packages
Name            : mackup
Epoch           : 0
Version         : 0.8.32
Release         : 13.fc41
Architecture    : noarch
Installed size  : 311.9 KiB
Source          : python-mackup-0.8.32-13.fc41.src.rpm
From repository : fedora
Summary         : Keep your application settings in sync
URL             : https://github.com/lra/mackup
License         : GPLv3
Description     : Mackup:
                : - Backs up your application settings in a safe directory (e.g. Dropbox)
                : - Syncs your application settings among all your workstations
                : - Restores your configuration on any fresh install in one command line
                : 
                : By only tracking pure configuration files, it keeps the cruft out of your
                : freshly new installed workstation (no cache, temporary and locally specific
                : files are transferred).
                : 
                : Mackup makes setting up the environment easy and simple, saving time for your
                : family, great ideas, and all the cool stuff you like.
Vendor          : Fedora Project
Dominant language
Python
Stars
15.3k
Forks
944
Avg merge
5h 53m
Merged PRs (30d)
1

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from lra/mackup

All issues in lra/mackup

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.