Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ubuntu 20.04 PPA version of Piper does not start with ModuleNotFoundError #515

Closed
KlfJoat opened this issue May 1, 2020 · 4 comments
Closed
Labels

Comments

@KlfJoat
Copy link

KlfJoat commented May 1, 2020

Information

  • ratbagd version (ratbagd --version): 0.13
  • Piper version: Since Piper doesn't run, this is what I've got...
$ apt show piper
Package: piper
Version: 0.4+git431-2964944~ubuntu20.04.1
  • Distribution: Ubuntu 20.04
  • Device: N/A (Logitech M705)
  • Kernel version (ex. uname -srmo): Linux 5.4.0-28-generic x86_64 GNU/Linux

Describe the bug
Using the Ubuntu PPA, Piper will not start via gnome-shell or the command-line.

When I start it via the command line I receive the following error

$ piper                                          
Traceback (most recent call last):                          
  File "/usr/bin/piper", line 36, in <module>            
    from piper.application import Application       
ModuleNotFoundError: No module named 'piper' 

This is admittedly the same issue as #341. In fact, I did some of the same troubleshooting...

$ ll /usr/lib/python3/dist-packages/piper
lrwxrwxrwx 1 root root 38 Apr 29 17:58 /usr/lib/python3/dist-packages/piper -> /usr/lib/python3.7/site-packages/piper
$ ll /usr/lib/python3.7/site-packages/piper
ls: cannot access '/usr/lib/python3.7/site-packages/piper': No such file or directory
$ ll /usr/lib/python3.8/site-packages/piper
total 164K
-rw-r--r-- 1 root root 3.1K Apr 28 16:16 application.py
(etc)

So the bug, IMO, seems to be that the Ubuntu 20.04 PPA does not install Piper correctly. It seems to use the wrong symlink location.

To Reproduce

Steps to reproduce the behavior:

  1. Install Ubuntu 20.04 (upgrade from 19.10)
  2. Run apt install piper
  3. Piper runs just fine. HOWEVER...
  4. Experience Logitech M705 segfault "invalid number of profiles (0)" libratbag#970
  5. To fix that problem, run
sudo add-apt-repository ppa:libratbag-piper/piper-libratbag-git
sudo apt-get update
sudo apt upgrade
  1. Open gnome-terminal
  2. Type piper
  3. See error

Logs
There are no logs. ratbagd does not start. I am unable to find command line help for Piper bc it will not start. Starting with piper --debug or piper --verbose provides nothing extra.

Additional context
Obviously, I can fix this individual problem for myself.

$ sudo ln -si /usr/lib/python3.8/site-packages/piper /usr/lib/python3/dist-packages/piper 
Executing sudo -- bash -x -v -c "ln" '-si' '/usr/lib/python3.8/site-packages/piper' '/usr/lib/python3/dist-packages/piper'
"ln" '-si' '/usr/lib/python3.8/site-packages/piper' '/usr/lib/python3/dist-packages/piper'
+ ln -si /usr/lib/python3.8/site-packages/piper /usr/lib/python3/dist-packages/piper
ln: replace '/usr/lib/python3/dist-packages/piper'? y
$ ll /usr/lib/python3/dist-packages/piper
lrwxrwxrwx 1 root root 38 May  1 14:06 /usr/lib/python3/dist-packages/piper -> /usr/lib/python3.8/site-packages/piper/

But that's a workaround, not a fix.

@KlfJoat KlfJoat added the bug label May 1, 2020
@FFY00
Copy link
Member

FFY00 commented May 2, 2020

cc @muzena

@stephanlachnit
Copy link
Member

stephanlachnit commented May 2, 2020

If you are on 20.04 you can also use the version in the Ubuntu universe repo (it will be stuck on 0.4 though). If you do this, remove piper+libratbag, remove the PPA and install with apt.

Edit: nvm, didn't see step 4.

@muzena
Copy link
Contributor

muzena commented May 2, 2020

@KlfJoat
I needed to update post installation script with python3 3.8.

Uninstall piper, remove manually made symlink python3.8 and then try again install
sudo apt install piper

@KlfJoat
Copy link
Author

KlfJoat commented May 2, 2020

@muzena
Thanks, your PPA update fixes it for me!

FYI, the postrm script handled removal of the symlink, no matter where it points to. So your middle step was unnecessary.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants