🐛 Using the -g devops flag fails with AttributeError: 'tuple' object has no attribute 'append' on macOS #119

Closed
opened 2022-12-14 07:24:22 +00:00 by cloudymax · 1 comment
cloudymax commented 2022-12-14 07:24:22 +00:00 (Migrated from github.com)

Describe the bug

Hoi 👋

I was installing the -g devops packages on my M1 machine and received the following error:

           DEBUG    run_pkg_mngrs(): passed in pkg_mngrs: ['brew', 'pip3.11']                                                                                        pkg_management.py:56
           DEBUG    run_pkg_mngrs(): passed in pkg_groups: ('devops',)                                                                                               pkg_management.py:57
Traceback (most recent call last):
  File "/opt/homebrew/bin/onboardme", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/opt/homebrew/lib/python3.11/site-packages/click/core.py", line 1130, in __call__
    return self.main(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/lib/python3.11/site-packages/click/core.py", line 1055, in main
    rv = self.invoke(ctx)
         ^^^^^^^^^^^^^^^^
  File "/opt/homebrew/lib/python3.11/site-packages/click/core.py", line 1404, in invoke
    return ctx.invoke(self.callback, **ctx.params)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/lib/python3.11/site-packages/click/core.py", line 760, in invoke
    return __callback(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/lib/python3.11/site-packages/onboardme/__init__.py", line 146, in main
    run_pkg_mngrs(pkg_mngrs, pkg_groups)
  File "/opt/homebrew/lib/python3.11/site-packages/onboardme/pkg_management.py", line 68, in run_pkg_mngrs
    pkg_groups.append("macOS")
    ^^^^^^^^^^^^^^^^^
AttributeError: 'tuple' object has no attribute 'append'

Local Environment (please complete the following information):**

  • OS: Ventura 13.0.1 (M1 cpu)
  • onboardme Version: 🎉 v0.15.15

Steps To Reproduce

Run onboardme -O -g devops on a M1 mac

Log file

onboardme --log_level debug --log_file issue.log

[08:21:23] DEBUG process_configs: cli_dict is:
{'package': {'managers': {'Darwin': ()}, 'groups': ('devops',)}, 'log': {'file': None, 'level': ''}, 'remote_hosts': (), 'firewall': False, 'steps': {'Darwin': ()}, 'dot_files': {'overwrite': True, 'git_url': None, 'git_branch': None}}

[08:21:23] DEBUG process_configs:  final config after filling cli_dict in with defaults:
{'package': {'managers': {'Darwin': ['brew', 'pip3.11']}, 'groups': ('devops',)}, 'log': {'file': '', 'level': 'INFO'}, 'remote_hosts': [], 'firewall': False, 'steps': {'Darwin': ['dot_files', 'packages', 'font_setup', 'vim_setup', 'neovim_setup', 'sudo_setup']}, 'dot_files': {'overwrite': True, 'git_url': 'https://github.com/jessebot/dot_files.git', 'git_branch': 'main'}}

[08:21:23] DEBUG main: User passed in the following preferences:
{'package': {'managers': {'Darwin': ['brew', 'pip3.11']}, 'groups': ('devops',)}, 'log': {'file': '', 'level': 'INFO'}, 'remote_hosts': [], 'firewall': False, 'steps': {'Darwin': ['dot_files', 'packages', 'font_setup', 'vim_setup', 'neovim_setup', 'sudo_setup']}, 'dot_files': {'overwrite': True, 'git_url': 'https://github.com/jessebot/dot_files.git', 'git_branch': 'main'}}
[08:21:23] DEBUG run_subprocess: git config --global init.defaultBranch main
[08:21:23] DEBUG run_subprocess: ['git', 'config', '--global', 'init.defaultBranch', 'main']
[08:21:23] DEBUG run_subprocess: {'cwd': '/Users/max/.git_dot_files'}
[08:21:23] DEBUG run_subprocess: (b'', b'')
[08:21:23] DEBUG run_subprocess: git config --global push.autoSetupRemote true
[08:21:23] DEBUG run_subprocess: ['git', 'config', '--global', 'push.autoSetupRemote', 'true']
[08:21:23] DEBUG run_subprocess: {'cwd': '/Users/max/.git_dot_files'}
[08:21:23] DEBUG run_subprocess: (b'', b'')
[08:21:23] DEBUG run_subprocess: git --git-dir=/Users/max/.git_dot_files --work-tree=/Users/max init
[08:21:23] DEBUG run_subprocess: ['git', '--git-dir=/Users/max/.git_dot_files', '--work-tree=/Users/max', 'init']
[08:21:23] DEBUG run_subprocess: {'cwd': '/Users/max/.git_dot_files'}
[08:21:23] DEBUG run_subprocess: (b'Reinitialized existing Git repository in /Users/max/.git_dot_files/\n', b'')
[08:21:23] DEBUG run_subprocess: git config status.showUntrackedFiles no
[08:21:23] DEBUG run_subprocess: ['git', 'config', 'status.showUntrackedFiles', 'no']
[08:21:23] DEBUG run_subprocess: {'cwd': '/Users/max/.git_dot_files'}
[08:21:23] DEBUG run_subprocess: (b'', b'')
[08:21:23] DEBUG run_subprocess: git remote add origin https://github.com/jessebot/dot_files.git
[08:21:23] DEBUG run_subprocess: ['git', 'remote', 'add', 'origin', 'https://github.com/jessebot/dot_files.git']
[08:21:23] DEBUG run_subprocess: {'error_ok': True, 'cwd': '/Users/max/.git_dot_files'}
[08:21:23] DEBUG run_subprocess: (b'', b'error: remote origin already exists.\n')
[08:21:23] DEBUG run_subprocess: git fetch
[08:21:23] DEBUG run_subprocess: ['git', 'fetch']
[08:21:23] DEBUG run_subprocess: {'cwd': '/Users/max/.git_dot_files'}
[08:21:23] DEBUG run_subprocess: (b'', b'')
[08:21:23] DEBUG run_subprocess: git reset --hard origin/main
[08:21:23] DEBUG run_subprocess: ['git', 'reset', '--hard', 'origin/main']
[08:21:23] DEBUG run_subprocess: {'cwd': '/Users/max/.git_dot_files'}
[08:21:23] DEBUG run_subprocess: (b'HEAD is now at 910310e remove kind pathing because brew is already done, probably\n', b'')
[08:21:23] DEBUG run_subprocess: git ls-files -m -d /Users/max
[08:21:23] DEBUG run_subprocess: ['git', 'ls-files', '-m', '-d', '/Users/max']
[08:21:23] DEBUG run_subprocess: {'cwd': '/Users/max/.git_dot_files'}
[08:21:23] DEBUG run_subprocess: (b'', b'')
[08:21:23] DEBUG run_subprocess: git ls-tree --full-tree -r --name-only origin/main
[08:21:23] DEBUG run_subprocess: ['git', 'ls-tree', '--full-tree', '-r', '--name-only', 'origin/main']
[08:21:23] DEBUG run_subprocess: {'cwd': '/Users/max/.git_dot_files'}
[08:21:23] DEBUG run_subprocess: (b'.bash_profile\n.bashrc\n.bashrc_k8s\n.config/asciinema/config\n.config/bat/config\n.config/bat/themes/spacechalk/spacechalk.tmTheme\n.config/gh/config.yml\n.config/glab-cli/config.yml\n.config/karabiner/karabiner.json\n.config/kitty/kitty-dark.png\n.config/kitty/kitty.conf\n.config/lsd/config.yaml\n.config/lsimg/config.yaml\n.config/neofetch/config.conf\n.config/neomutt/key_bindings.neomuttrc\n.config/neomutt/mailcap\n.config/neomutt/neomuttrc\n.config/neomutt/themes/spacechalk/neomutt_spacechalk_colors.muttrc\n.config/neomutt/themes/spacechalk/powerline.neomuttrc\n.config/nvim/init.lua\n.config/nvim/lua/plugins.lua\n.config/nvim/lua/user/airline.lua\n.config/nvim/lua/user/ale.lua\n.config/nvim/lua/user/dashboard.lua\n.config/nvim/lua/user/folding.lua\n.config/nvim/lua/user/nvim-tree.lua\n.config/nvim/lua/user/tree-sitter.lua\n.config/nvim/packerinit.vim\n.config/powerline/colors.json\n.config/powerline/colorschemes/default.json\n.config/powerline/colorschemes/shell/default.json\n.config/powerline/themes/powerline.json\n.config/powerline/themes/powerline_terminus.json\n.config/powerline/themes/shell/default.json\n.config/powerline/themes/tmux/default.json\n.config/powerline/themes/unicode_terminus.json\n.config/ranger/rc.conf\n.config/ranger/scope.sh\n.config/terminator/config\n.cron/README.md\n.cron/alarms.sh\n.cron/reminders_crontab\n.cron/updates.sh\n.gitconfig\n.gitignore\n.hyper.js\n.iterm2_shell_integration.bash\n.local/bin/iterm2-splits\n.local/bin/utc\n.local/bin/w3m-splits\n.tmux.conf\n.vim/autoload/plug.vim\n.vim/syntax/conf.vim\n.vim/syntax/python.vim\n.vim/syntax/ssh_known_hosts.vim\n.vim/syntax/toml.vim\n.vim/templates/template.md\n.vim/templates/template.py\n.vimrc\n.w3m/config\n.w3m/keymap\n.zshrc\nLICENSE\nLibrary/Application Support/iTerm2/DynamicProfiles/Profiles.json\nREADME.md\n', b'')
[08:21:23] DEBUG run_pkg_mngrs: passed in pkg_mngrs: ['brew', 'pip3.11']
[08:21:23] DEBUG run_pkg_mngrs: passed in pkg_groups: ('devops',)

Expected behavior

Expecting script to progress through the brew package install process

Thanks a ton for this great project! 🚀

## Describe the bug Hoi 👋 I was installing the `-g devops` packages on my M1 machine and received the following error: ```bash DEBUG run_pkg_mngrs(): passed in pkg_mngrs: ['brew', 'pip3.11'] pkg_management.py:56 DEBUG run_pkg_mngrs(): passed in pkg_groups: ('devops',) pkg_management.py:57 Traceback (most recent call last): File "/opt/homebrew/bin/onboardme", line 8, in <module> sys.exit(main()) ^^^^^^ File "/opt/homebrew/lib/python3.11/site-packages/click/core.py", line 1130, in __call__ return self.main(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/homebrew/lib/python3.11/site-packages/click/core.py", line 1055, in main rv = self.invoke(ctx) ^^^^^^^^^^^^^^^^ File "/opt/homebrew/lib/python3.11/site-packages/click/core.py", line 1404, in invoke return ctx.invoke(self.callback, **ctx.params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/homebrew/lib/python3.11/site-packages/click/core.py", line 760, in invoke return __callback(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/homebrew/lib/python3.11/site-packages/onboardme/__init__.py", line 146, in main run_pkg_mngrs(pkg_mngrs, pkg_groups) File "/opt/homebrew/lib/python3.11/site-packages/onboardme/pkg_management.py", line 68, in run_pkg_mngrs pkg_groups.append("macOS") ^^^^^^^^^^^^^^^^^ AttributeError: 'tuple' object has no attribute 'append' ``` ### Local Environment (please complete the following information):** - OS: Ventura 13.0.1 (M1 cpu) - onboardme Version: 🎉 v0.15.15 ## Steps To Reproduce Run `onboardme -O -g devops` on a M1 mac ## Log file `onboardme --log_level debug --log_file issue.log` ```bash [08:21:23] DEBUG process_configs: cli_dict is: {'package': {'managers': {'Darwin': ()}, 'groups': ('devops',)}, 'log': {'file': None, 'level': ''}, 'remote_hosts': (), 'firewall': False, 'steps': {'Darwin': ()}, 'dot_files': {'overwrite': True, 'git_url': None, 'git_branch': None}} [08:21:23] DEBUG process_configs:  final config after filling cli_dict in with defaults: {'package': {'managers': {'Darwin': ['brew', 'pip3.11']}, 'groups': ('devops',)}, 'log': {'file': '', 'level': 'INFO'}, 'remote_hosts': [], 'firewall': False, 'steps': {'Darwin': ['dot_files', 'packages', 'font_setup', 'vim_setup', 'neovim_setup', 'sudo_setup']}, 'dot_files': {'overwrite': True, 'git_url': 'https://github.com/jessebot/dot_files.git', 'git_branch': 'main'}} [08:21:23] DEBUG main: User passed in the following preferences: {'package': {'managers': {'Darwin': ['brew', 'pip3.11']}, 'groups': ('devops',)}, 'log': {'file': '', 'level': 'INFO'}, 'remote_hosts': [], 'firewall': False, 'steps': {'Darwin': ['dot_files', 'packages', 'font_setup', 'vim_setup', 'neovim_setup', 'sudo_setup']}, 'dot_files': {'overwrite': True, 'git_url': 'https://github.com/jessebot/dot_files.git', 'git_branch': 'main'}} [08:21:23] DEBUG run_subprocess: git config --global init.defaultBranch main [08:21:23] DEBUG run_subprocess: ['git', 'config', '--global', 'init.defaultBranch', 'main'] [08:21:23] DEBUG run_subprocess: {'cwd': '/Users/max/.git_dot_files'} [08:21:23] DEBUG run_subprocess: (b'', b'') [08:21:23] DEBUG run_subprocess: git config --global push.autoSetupRemote true [08:21:23] DEBUG run_subprocess: ['git', 'config', '--global', 'push.autoSetupRemote', 'true'] [08:21:23] DEBUG run_subprocess: {'cwd': '/Users/max/.git_dot_files'} [08:21:23] DEBUG run_subprocess: (b'', b'') [08:21:23] DEBUG run_subprocess: git --git-dir=/Users/max/.git_dot_files --work-tree=/Users/max init [08:21:23] DEBUG run_subprocess: ['git', '--git-dir=/Users/max/.git_dot_files', '--work-tree=/Users/max', 'init'] [08:21:23] DEBUG run_subprocess: {'cwd': '/Users/max/.git_dot_files'} [08:21:23] DEBUG run_subprocess: (b'Reinitialized existing Git repository in /Users/max/.git_dot_files/\n', b'') [08:21:23] DEBUG run_subprocess: git config status.showUntrackedFiles no [08:21:23] DEBUG run_subprocess: ['git', 'config', 'status.showUntrackedFiles', 'no'] [08:21:23] DEBUG run_subprocess: {'cwd': '/Users/max/.git_dot_files'} [08:21:23] DEBUG run_subprocess: (b'', b'') [08:21:23] DEBUG run_subprocess: git remote add origin https://github.com/jessebot/dot_files.git [08:21:23] DEBUG run_subprocess: ['git', 'remote', 'add', 'origin', 'https://github.com/jessebot/dot_files.git'] [08:21:23] DEBUG run_subprocess: {'error_ok': True, 'cwd': '/Users/max/.git_dot_files'} [08:21:23] DEBUG run_subprocess: (b'', b'error: remote origin already exists.\n') [08:21:23] DEBUG run_subprocess: git fetch [08:21:23] DEBUG run_subprocess: ['git', 'fetch'] [08:21:23] DEBUG run_subprocess: {'cwd': '/Users/max/.git_dot_files'} [08:21:23] DEBUG run_subprocess: (b'', b'') [08:21:23] DEBUG run_subprocess: git reset --hard origin/main [08:21:23] DEBUG run_subprocess: ['git', 'reset', '--hard', 'origin/main'] [08:21:23] DEBUG run_subprocess: {'cwd': '/Users/max/.git_dot_files'} [08:21:23] DEBUG run_subprocess: (b'HEAD is now at 910310e remove kind pathing because brew is already done, probably\n', b'') [08:21:23] DEBUG run_subprocess: git ls-files -m -d /Users/max [08:21:23] DEBUG run_subprocess: ['git', 'ls-files', '-m', '-d', '/Users/max'] [08:21:23] DEBUG run_subprocess: {'cwd': '/Users/max/.git_dot_files'} [08:21:23] DEBUG run_subprocess: (b'', b'') [08:21:23] DEBUG run_subprocess: git ls-tree --full-tree -r --name-only origin/main [08:21:23] DEBUG run_subprocess: ['git', 'ls-tree', '--full-tree', '-r', '--name-only', 'origin/main'] [08:21:23] DEBUG run_subprocess: {'cwd': '/Users/max/.git_dot_files'} [08:21:23] DEBUG run_subprocess: (b'.bash_profile\n.bashrc\n.bashrc_k8s\n.config/asciinema/config\n.config/bat/config\n.config/bat/themes/spacechalk/spacechalk.tmTheme\n.config/gh/config.yml\n.config/glab-cli/config.yml\n.config/karabiner/karabiner.json\n.config/kitty/kitty-dark.png\n.config/kitty/kitty.conf\n.config/lsd/config.yaml\n.config/lsimg/config.yaml\n.config/neofetch/config.conf\n.config/neomutt/key_bindings.neomuttrc\n.config/neomutt/mailcap\n.config/neomutt/neomuttrc\n.config/neomutt/themes/spacechalk/neomutt_spacechalk_colors.muttrc\n.config/neomutt/themes/spacechalk/powerline.neomuttrc\n.config/nvim/init.lua\n.config/nvim/lua/plugins.lua\n.config/nvim/lua/user/airline.lua\n.config/nvim/lua/user/ale.lua\n.config/nvim/lua/user/dashboard.lua\n.config/nvim/lua/user/folding.lua\n.config/nvim/lua/user/nvim-tree.lua\n.config/nvim/lua/user/tree-sitter.lua\n.config/nvim/packerinit.vim\n.config/powerline/colors.json\n.config/powerline/colorschemes/default.json\n.config/powerline/colorschemes/shell/default.json\n.config/powerline/themes/powerline.json\n.config/powerline/themes/powerline_terminus.json\n.config/powerline/themes/shell/default.json\n.config/powerline/themes/tmux/default.json\n.config/powerline/themes/unicode_terminus.json\n.config/ranger/rc.conf\n.config/ranger/scope.sh\n.config/terminator/config\n.cron/README.md\n.cron/alarms.sh\n.cron/reminders_crontab\n.cron/updates.sh\n.gitconfig\n.gitignore\n.hyper.js\n.iterm2_shell_integration.bash\n.local/bin/iterm2-splits\n.local/bin/utc\n.local/bin/w3m-splits\n.tmux.conf\n.vim/autoload/plug.vim\n.vim/syntax/conf.vim\n.vim/syntax/python.vim\n.vim/syntax/ssh_known_hosts.vim\n.vim/syntax/toml.vim\n.vim/templates/template.md\n.vim/templates/template.py\n.vimrc\n.w3m/config\n.w3m/keymap\n.zshrc\nLICENSE\nLibrary/Application Support/iTerm2/DynamicProfiles/Profiles.json\nREADME.md\n', b'') [08:21:23] DEBUG run_pkg_mngrs: passed in pkg_mngrs: ['brew', 'pip3.11'] [08:21:23] DEBUG run_pkg_mngrs: passed in pkg_groups: ('devops',) ``` ### Expected behavior Expecting script to progress through the brew package install process Thanks a ton for this great project! 🚀
jessebot commented 2022-12-16 09:00:43 +00:00 (Migrated from github.com)

Hi, and thanks for reporting this!

I tested it, and it's failing on non-M1 macs. Let me take a look!

Hi, and thanks for reporting this! I tested it, and it's failing on non-M1 macs. Let me take a look!
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
jessebot/onboardme#119
No description provided.