anishathalye / dotbot

A tool that bootstraps your dotfiles ⚡️

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Running install script fails with python error

mrt181 opened this issue · comments

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'

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).

Still getting that error after updating the submodule

Could not read config file:
  module 'collections' has no attribute 'Hashable'

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.