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

Failed in Fedora 34 #35

Closed
maxreuben opened this issue Jan 9, 2022 · 13 comments
Closed

Failed in Fedora 34 #35

maxreuben opened this issue Jan 9, 2022 · 13 comments

Comments

@maxreuben
Copy link

maxreuben commented Jan 9, 2022

The script failed to determine desktop environment in nautilus 40.2 in Fedora 34 x86_64 running Gnome 40.7 and Default WM (Mutter?):-

Checking dependencies ...

Required dependencies:
    Python Imaging Library .......
OK

Installing epub-thumbnailer to /usr/bin/ ...
OK

Could not determine your desktop environment version. You can still use the thumbnailer script manually.

For example:

    epub-thumbnailer Lawrence\ Lessig\ -\ Free\ Culture.epub cover.png 128

Also, please consider reporting this in https://github.com/marianosimone/epub-thumbnailer/
including information about your distribution, window manager, file manager and the result of `ps -A`

The script doesn't work from cli either. When i run epub-thumbnailer <filename>.epub :-

Traceback (most recent call last):
  File "/usr/bin/epub-thumbnailer", line 132, in <module>
    output_file = sys.argv[2]
IndexError: list index out of range

Output of ps -A: ps.txt

python --version: Python 3.9.9

Similar issue has been reported in Ubuntu 21.10 #34 which runs the same desktop environment.

@marianosimone
Copy link
Owner

Thanks for reporting!

I don't have access to a box with that configuration, but could you try this instead?

In the install.py that you downloaded, replace: https://github.com/marianosimone/epub-thumbnailer/blob/master/install.py#L68-L78

with:

VERSION_GUSSERS = {
    'gnome-shell': gnome_shell_version
}

After that, try re-running the installer.

If that doesn't work, could you share the output of running gnome-session --version in a terminal?

For your test run, though, it seems like you missed one parameter:

epub-thumbnailer <filename>.epub vs epub-thumbnailer <filename>.epub <size>

@maxreuben
Copy link
Author

Sorry, That didn't work.
gnome-session --version prints nothing.
gnome-shell --version prints GNOME Shell 40.7

The command worked from cli and gave the correct output when all the arguments were given like you said.

@marianosimone
Copy link
Owner

Thanks for following up! Could you try one more thing?

What happens if you change: https://github.com/marianosimone/epub-thumbnailer/blob/master/install.py#L66 to:

return ('gnome%s' % major_version)

(and keep the change for the VERSION_GUESSER in #35 (comment))

@maxreuben
Copy link
Author

The same error persists on running python install.py install. The thumbnails don't show up in nautilus.

Output of ps -A

@marianosimone
Copy link
Owner

Thanks for bearing with me while I try to debug this without access to a similar setup :)

Can you confirm that with those two changes, you are still seeing the error message that says "Could not determine your desktop environment version. You can still use the thumbnailer script manually."?

If so, can you give me the output of ps -A | grep 'gnome-shell$'? From the output you've shared so far, I'd expect to see at least one line for that, so I'd be surprised if the installer kept failing.

@maxreuben
Copy link
Author

Thank you for being so prompt in responding to this issue. Most developers don't do that. :)

Yes, I can confirm that I see that error message despite making those changes you requested.

ps -A | grep 'gnome-shell$':

reuben      3059  1.1  2.1 5076644 347940 ?      Ssl  07:00   3:15  \_ /usr/bin/gnome-shell

@marianosimone
Copy link
Owner

marianosimone commented Jan 12, 2022

Oh, I missed one more change (I can almost promise this is the last one!)

Can you change this line from elif environment in ('gnome3', 'xfce4', 'unity', 'openbox', 'enlightenment', 'i3', 'pantheon'): to elif environment is not None

(maintaining the other two changes!)

@maxreuben
Copy link
Author

That worked. Thanks!

@marianosimone
Copy link
Owner

Great, @maxreuben can you confirm that this both installed and made thumbnails start appearing? If so, I'll fix the code to get a new version out with all these fixes.

Thanks a lot for helping me figure it out!

@jhossettstalinn
Copy link

It works on Ubuntu 21.10 too, and it is installed. Thank you.

@ghost
Copy link

ghost commented Jan 13, 2022

Fedora 35, I can confirm this both installed and made thumbnails start appearing at the same time. Thanks !

@maxreuben
Copy link
Author

maxreuben commented Jan 13, 2022

@marianosimone Yes, I can confirm that this is installed and the thumbnails are working. Thanks!

@marianosimone
Copy link
Owner

Thanks both for the confirmations. The new version is up!

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

No branches or pull requests

3 participants