Skip to content
This repository has been archived by the owner on Dec 13, 2023. It is now read-only.

ModuleNotFoundError: No module named 'lyrebird.mainwindow' #9

Closed
TiagoTiago opened this issue Aug 13, 2020 · 14 comments
Closed

ModuleNotFoundError: No module named 'lyrebird.mainwindow' #9

TiagoTiago opened this issue Aug 13, 2020 · 14 comments

Comments

@TiagoTiago
Copy link

I just downloaded V1.0.1, when I try to launch it, I get this:

Traceback (most recent call last):
  File "/usr/local/bin/lyrebird/app.py", line 5, in <module>
    import lyrebird.mainwindow as mainwindow
ModuleNotFoundError: No module named 'lyrebird.mainwindow'

Lemme know what other details you need.

@TiagoTiago
Copy link
Author

TiagoTiago commented Aug 13, 2020

Oh, maybe it's a duplicate: #5 (comment)

edit: Though, that says it started working for them, with me it still borked

@ghost
Copy link

ghost commented Aug 13, 2020

What distro are you on and what app launcher are you using? Could you also run ls -la /usr/local/bin/lyrebird for me please?

@TiagoTiago
Copy link
Author

What distro are you on and what app launcher are you using?

Linux Mint, with the Mate DE.

I get nothing when I try to run the shortcut, but if I take the command from the shortcut and try to run it on the terminal, I get the error mentioned above.

Could you also run ls -la /usr/local/bin/lyrebird for me please?

$ ls -la /usr/local/bin/lyrebird
total 48
drwxr-xr-x 3 root root  4096 Aug 13 15:12 .
drwxr-xr-x 3 root root  4096 Aug 13 15:12 ..
-rwxr-xr-x 1 root root   471 Aug 13 16:02 app.py
-rw-r--r-- 1 root root 30521 Aug 13 16:02 icon.png
drwx------ 3 root root  4096 Aug 13 15:12 lyrebird

@underspiffy
Copy link

I get this message as well when launching it using python3 in a terminal. When using dmenu it just never launches.

I am using Manjaro i3 edition.

ls -la /usr/local/bin/lyrebird output:
total 48
drwxr-xr-x 3 root root 4096 Aug 13 08:18 .
drwxr-xr-x 3 root root 4096 Aug 13 08:18 ..
-rwxr-xr-x 1 root root 471 Aug 13 08:18 app.py
-rw-r--r-- 1 root root 30521 Aug 13 08:18 icon.png
drwx------ 4 root root 4096 Aug 13 08:25 lyrebird

@ghost
Copy link

ghost commented Aug 13, 2020

Thanks for the info, could you also run:

  1. ls -la /usr/local/bin/lyrebird/lyrebird/
  2. cat /usr/local/bin/lyrebird/lyrebird/mainwindow.py | head -n 15
  3. python3 /usr/local/bin/lyrebird/lyrebird/mainwindow.py

Sorry for all the commands, I'm just trying to figure out if mainwindow.py is installed and well on your system.

This is what I get for reference:

drwxr-xr-x 4 root root 4096 Aug 13 16:31 .
drwxr-xr-x 3 root root 4096 Aug 13 16:31 ..
drwxr-xr-x 3 root root 4096 Aug 13 16:31 core
-rw-r--r-- 1 root root    0 Aug 13 16:31 __init__.py
-rw-r--r-- 1 root root 8676 Aug 13 16:31 mainwindow.py
drwxr-xr-x 2 root root 4096 Aug 13 16:31 __pycache__
#!/bin/python

import gi
import subprocess

gi.require_version('Gtk', '3.0')
from gi.repository import Gtk, Gdk, GdkPixbuf

# Core imports
import lyrebird.core.presets as presets
import lyrebird.core.state as state
import lyrebird.core.config as config
import lyrebird.core.utils as utils

from lyrebird.core.presets import Preset
Traceback (most recent call last):
  File "/usr/local/bin/lyrebird/lyrebird/mainwindow.py", line 10, in <module>
    import lyrebird.core.presets as presets
ModuleNotFoundError: No module named 'lyrebird'

@underspiffy
Copy link

For some reason I am getting a permission denied on the folder /usr/local/bin/lyrebird/lyrebird/

The following allowed it to launch
sudo chown spiffy /usr/local/bin/lyrebird/lyrebird/*

No issues after that.

ghost pushed a commit that referenced this issue Aug 13, 2020
@ghost
Copy link

ghost commented Aug 13, 2020

Most likely a permission issue! I've put in a fix in the latest commit on master. Could you git pull, re-run the installer and check it that solves your issue? From the ls dumps it looks as if you can't access the sources folder.

@TiagoTiago
Copy link
Author

I cloned it anew to guarantee a fresh start, and now I'm getting this on the terminal:

Traceback (most recent call last):
  File "/usr/local/bin/lyrebird/app.py", line 5, in <module>
    import lyrebird.mainwindow as mainwindow
  File "/usr/local/bin/lyrebird/lyrebird/mainwindow.py", line 10, in <module>
    import lyrebird.core.presets as presets
  File "/usr/local/bin/lyrebird/lyrebird/core/presets.py", line 4, in <module>
    import lyrebird.core.config as config
  File "/usr/local/bin/lyrebird/lyrebird/core/config.py", line 3, in <module>
    from dataclasses import dataclass
ModuleNotFoundError: No module named 'dataclasses'

I'll run those commands you asked on a previous reply and come back to post the results.

@ghost
Copy link

ghost commented Aug 13, 2020

No need to run what I said before, it looks as if its been solved! Could you find out which Python version you're using by typing python3 --version? My best guess is that your version is out of date.

@TiagoTiago
Copy link
Author

$ python3 --version
Python 3.6.9

The Update Manager app is not suggesting any updates though.

@ghost
Copy link

ghost commented Aug 13, 2020

Dataclasses are a Python 3.7+ feature, I'm not sure why you're not seeing an update! :-(

@chloecormier
Copy link

Linux Mint 19.3 (and Ubuntu 18.04, more generally) comes with Python 3.6.9, TiagoTiago will need to upgrade to Linux Mint 20 to get a version of Python that's new enough sadly :(

@ghost ghost closed this as completed Aug 13, 2020
@calexil
Copy link

calexil commented Aug 13, 2020

sudo apt install python3.7

@chloecormier
Copy link

Ah, I wasn't aware it was in the repos as a separate package. That would mean you can run Lyrebird by replacing python3 in the .desktop file with python3.7 specifically (since python3 would still be calling Python 3.6 as the default), but it's a little annoying and unintuitive for new users. It'd be a bit of a bodge but maybe the install.sh script could install a special .desktop file for Ubuntu 18.04 and Linux Mint 19.3 that points to python3.7 instead, and to mention it as a dependency for those versions.

This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants