lra / mackup

Keep your application settings in sync (OS X/Linux)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

mackup command stopped working - sys.exit(load_entry_point('mackup==0.8.37', 'console_scripts', 'mackup')())

evanharmon1 opened this issue · comments

Hi,
The mackup command stopped working recently. I'm not sure if it was after a macOS update or brew update, etc. I'm on Ventura 13.4.1. mackup 0.8.37. Homebrew 4.0.28

mackup list
Traceback (most recent call last):
  File "/opt/homebrew/bin/mackup", line 33, in <module>
    sys.exit(load_entry_point('mackup==0.8.37', 'console_scripts', 'mackup')())
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/mackup/0.8.37/libexec/lib/python3.11/site-packages/mackup/main.py", line 67, in main
    app_db = ApplicationsDatabase()
             ^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/mackup/0.8.37/libexec/lib/python3.11/site-packages/mackup/appsdb.py", line 44, in __init__
    app_pretty_name = config.get("application", "name")
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/python@3.11/3.11.4_1/Frameworks/Python.framework/Versions/3.11/lib/python3.11/configparser.py", line 797, in get
    d = self._unify_values(section, vars)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/python@3.11/3.11.4_1/Frameworks/Python.framework/Versions/3.11/lib/python3.11/configparser.py", line 1168, in _unify_values
    raise NoSectionError(section) from None
configparser.NoSectionError: No section: 'application'
 ✘ evan@Evan's MacBook Pro 2021  ~  clear
 evan@Evan's MacBook Pro 2021  ~  mackup backup
Traceback (most recent call last):
  File "/opt/homebrew/bin/mackup", line 33, in <module>
    sys.exit(load_entry_point('mackup==0.8.37', 'console_scripts', 'mackup')())
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/mackup/0.8.37/libexec/lib/python3.11/site-packages/mackup/main.py", line 67, in main
    app_db = ApplicationsDatabase()
             ^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/mackup/0.8.37/libexec/lib/python3.11/site-packages/mackup/appsdb.py", line 44, in __init__
    app_pretty_name = config.get("application", "name")
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/python@3.11/3.11.4_1/Frameworks/Python.framework/Versions/3.11/lib/python3.11/configparser.py", line 797, in get
    d = self._unify_values(section, vars)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/python@3.11/3.11.4_1/Frameworks/Python.framework/Versions/3.11/lib/python3.11/configparser.py", line 1168, in _unify_values
    raise NoSectionError(section) from None
configparser.NoSectionError: No section: 'application'

I don't think any of my mackup config files have changed. I'm thinking it's a python issue from maybe brew updating python? What would you recommend to fix the mackup command? Thanks!

Can you share you ~/.mackup.cfg please?

configparser.NoSectionError: No section: 'application'

This error indicates there is something wrong with your config file.

[storage]
engine = icloud

[applications_to_ignore]
ssh
aws
ansible
kubectl

That looks great, do you have any custom configurations? Perhaps one of you custom configurations in ~/.mackup/*.cfg files is missing [application] or has a syntax error.

See this for more details:
https://github.com/lra/mackup/tree/master/doc#add-support-for-an-application-or-almost-any-file-or-directory

Ah, I'd forgotten about the custom configuration part! I had setup a ~/.mackup/*.cfg config file and looks like I accidentally symlinked my ~/.mackup.cfg file inside that folder at some point in addition to having that file in ~/. (Probably an accident from recently modifying my os configuration scripts). So I tried to just delete that extra config file in that folder and reran mackup which ran successfully. Thanks for pointing me in that direction!

Sweet! Glad we could figure it out.