anishathalye / dotbot

A tool that bootstraps your dotfiles ⚡️
MIT License
6.91k stars 288 forks source link

Running install script fails with python error #311

Closed mrt181 closed 2 years ago

mrt181 commented 2 years ago

I get this output:

~/.dotfiles$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 22.04 LTS
Release:    22.04
Codename:   jammy
~/.dotfiles$ python3 --version
Python 3.10.4
~/.dotfiles$ ./install 
Submodule 'dotbot' (https://github.com/anishathalye/dotbot) registered for path 'dotbot'
Cloning into '/home/martin/.dotfiles/dotbot'...
Submodule path 'dotbot': checked out '2dc876cd65fc21093cf54f6f7a9f6a2fa5971a45'
Submodule 'lib/pyyaml' (https://github.com/yaml/pyyaml) registered for path 'dotbot/lib/pyyaml'
Cloning into '/home/martin/.dotfiles/dotbot/lib/pyyaml'...
Submodule path 'dotbot/lib/pyyaml': checked out '7e026bfee9cc0bddeb1bbca0c4a0bcd826c2bfdf'
/home/martin/.dotfiles/dotbot/dotbot/plugins/link.py:52: SyntaxWarning: "is" with a literal. Did you mean "=="?
  if len(glob_results) is 0:
/home/martin/.dotfiles/dotbot/dotbot/plugins/link.py:57: SyntaxWarning: "is" with a literal. Did you mean "=="?
  if glob_star_loc is -1 and destination[-1] is '/':
/home/martin/.dotfiles/dotbot/dotbot/plugins/link.py:57: SyntaxWarning: "is" with a literal. Did you mean "=="?
  if glob_star_loc is -1 and destination[-1] is '/':
/home/martin/.dotfiles/dotbot/dotbot/plugins/link.py:64: SyntaxWarning: "is" with a literal. Did you mean "=="?
  elif glob_star_loc is -1 and len(glob_results) is 1:
/home/martin/.dotfiles/dotbot/dotbot/plugins/link.py:64: SyntaxWarning: "is" with a literal. Did you mean "=="?
  elif glob_star_loc is -1 and len(glob_results) is 1:
Could not read config file:
  module 'collections' has no attribute 'Hashable'
anishathalye commented 2 years ago

You are on a pretty old version of Dotbot, from November 2019. Try upgrading to the latest version, with git submodule update --init --remote dotbot (run in the Git repo root; remember to git commit afterwards).

borisrorsvort commented 1 year ago

Still getting that error after updating the submodule

Could not read config file:
  module 'collections' has no attribute 'Hashable'
anishathalye commented 1 year ago

Can you cd dotbot (or wherever you put the submodule) and do git rev-parse HEAD and git status and post the output of those two?

I am guessing you updated the submodule but forgot to git commit, so the ./install checked out the old committed version of the submodule.

triwats commented 1 month ago

This helped, but I think there's a good cause for improved documentation. I'll put an improvement in as a PR for exactly that.

There's a tonne of users that are coming back (like I did 5 minutes ago!) to their dotfiles on new machines. This is not something I do regularly.

Just to clarify, the fix was:

git submodule update --init --remote dotbot
git commit -m "fix(NULL): Updating dotbot via git submodule"
chmod +x install
./install