Error after system update

After updating my XFCE Manjaro whenever I open a terminal I get the following error:

Traceback (most recent call last):
    File "/home/mehdi/.local/bin/powerline-shell", line 5, in <module>
        from powerline_shell import main
ModuleNotFoundError: No module named 'powerline_shell'

Is the problem.
Why is that there and how is it configured?
(its not from a repo package)

I would assume also that .bashrc/.zshrc or some other config file is trying to call this broken powerline executable.

I have no idea about this how it configured
How can I solve this?

grep powerline ~/*

We want to see whats calling it. Again, likely bashrc or zshrc.

grep powerline ~/*
grep: /home/mehdi/Desktop: Is a directory
grep: /home/mehdi/Documents: Is a directory
grep: /home/mehdi/Downloads: Is a directory
grep: /home/mehdi/Music: Is a directory
grep: /home/mehdi/pgadmin4: Is a directory
grep: /home/mehdi/Pictures: Is a directory
grep: /home/mehdi/Public: Is a directory
grep: /home/mehdi/PycharmProjects: Is a directory
grep: /home/mehdi/snap: Is a directory
grep: /home/mehdi/Templates: Is a directory
grep: /home/mehdi/Videos: Is a directory
Traceback (most recent call last):                                                                                         
  File "/home/mehdi/.local/bin/powerline-shell", line 5, in <module>
    from powerline_shell import main
ModuleNotFoundError: No module named 'powerline_shell'

I dont know why I was thinking that would work well.

grep -s powerline ~/.*

(POSIX does not expand * to include dotfiles)

grep -s powerline ~/.*

/home/mehdi/.bash_history:cd ./usr/lib/python3.9/site-packages/powerline/bindings/bash/
/home/mehdi/.bash_history:cd /usr/lib/python3.9/site-packages/powerline/bindings/bash/
/home/mehdi/.bash_history:find powerline.sh
/home/mehdi/.bash_history:find -name powerline.sh
/home/mehdi/.bash_history:find -name powerline
/home/mehdi/.bash_history:find -name powerline.sh
/home/mehdi/.bash_history:sudo find -name powerline.sh
/home/mehdi/.bash_history:cd /usr/lib/python3.9/site-packages/powerline/bindings/
/home/mehdi/.bash_history:chmod +x powerline.sh 
/home/mehdi/.bash_history:sudo chmod +x powerline.sh 
/home/mehdi/.bash_history:sudo chmod +x powerline.sh 
/home/mehdi/.bash_history:sudo pacman -S powerline
/home/mehdi/.bashrc:powerline-daemon -q
/home/mehdi/.bashrc:/usr/lib/python3.9/site-packages/powerline/bindings/bash/powerline.sh
/home/mehdi/.zsh_history:: 1638128434:0;pacman -S powerline
/home/mehdi/.zsh_history:: 1638128438:0;sudo pacman -S powerline
/home/mehdi/.zsh_history:: 1638129612:0;powerline
/home/mehdi/.zsh_history:: 1638129619:0;powerline-config
/home/mehdi/.zsh_history:: 1638136135:0;powerline
/home/mehdi/.zsh_history:: 1638136140:0;powerline /?
/home/mehdi/.zsh_history:: 1638136144:0;powerline -h
/home/mehdi/.zsh_history:: 1638309454:0;powerline
/home/mehdi/.zsh_history:: 1638309896:0;pip3 install powerline-shell\
/home/mehdi/.zsh_history:: 1638309901:0;pip install powerline-shell\
/home/mehdi/.zsh_history:: 1638310256:0;pip3 install powerline-shell\
/home/mehdi/.zsh_history:: 1638310267:0;powerline-shell\
/home/mehdi/.zsh_history:: 1638310280:0;powerline\
/home/mehdi/.zsh_history:: 1638310286:0;powerline-config\
/home/mehdi/.zsh_history:: 1638310301:0;powerline-render\
/home/mehdi/.zsh_history:: 1638310670:0;git clone https://github.com/powerline/fonts.git --depth=1\
/home/mehdi/.zsh_history:: 1641373609:0;pip install powerline-shell\
/home/mehdi/.zsh_history:: 1692745165:0;yay -S --rebuild  powerline_shell 
/home/mehdi/.zsh_history:: 1692745248:0;yay -S powerline_shell 
/home/mehdi/.zsh_history:: 1692749294:0;grep powerline ~/*
/home/mehdi/.zsh_history:: 1692782694:0;grep -s powerline ~/.*\
/home/mehdi/.zshrc:function powerline_precmd() {
/home/mehdi/.zshrc:    PS1="$(~/.local/bin/powerline-shell --shell zsh $?)"
/home/mehdi/.zshrc:function install_powerline_precmd() {
/home/mehdi/.zshrc:    if [ "$s" = "powerline_precmd" ]; then
/home/mehdi/.zshrc:  precmd_functions+=(powerline_precmd)
/home/mehdi/.zshrc:    install_powerline_precmd
Traceback (most recent call last):                                                                                         
  File "/home/mehdi/.local/bin/powerline-shell", line 5, in <module>
    from powerline_shell import main
ModuleNotFoundError: No module named 'powerline_shell'

You have it in both .bashrc and .zshrc, but given the output it appears you use zsh.
So … you can comment out the linesin your .zshrc file. Example:

#function powerline_precmd() {
#   PS1="$(~/.local/bin/powerline-shell --shell zsh $?)"
#}

But, I will also mention … it would appear you probably want to use modern manjaro configs?
If so you may want to make sure you have manjaro-zsh-config installed … and then go and find the .zshrc file in /etc/skel/ and copy it to your home.

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.