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

cinnamon-settings: No module named Image #2495

Closed
orschiro opened this issue Oct 18, 2013 · 15 comments
Closed

cinnamon-settings: No module named Image #2495

orschiro opened this issue Oct 18, 2013 · 15 comments

Comments

@orschiro
Copy link

Issue:

[orschiro@thinkpad ~]$ cinnamon-settings
No module named Image

Installed packages:

cinnamon 2.0.2-2
cinnamon-control-center 2.0.2-1
cinnamon-desktop 2.0.1-1
cinnamon-screensaver 2.0.0-1
cinnamon-session 2.0.1-1
cinnamon-settings-daemon 2.0.1-2
cinnamon-translations 2.0.1-1
python2-pillow 2.2.1-2

If I install python2-imaging, I can start cinnamon-settings. However, it conflicts with python2-pillow which is pulled as a dependency of cinnamon:

:: python2-imaging and python2-pillow are in conflict (python-imaging). Remove python2-pillow? [y/N] y
error: failed to prepare transaction (could not satisfy dependencies)
:: cinnamon: requires python2-pillow

The issue is further described in the Arch Linux bugtracker:

https://bugs.archlinux.org/task/37289

However, we did not come to a solution. Therefore I would like to hear what upstream says on this.

Thanks!

@orschiro
Copy link
Author

orschiro commented Nov 1, 2013

Unfortunately the problem still persists with cinnamon 2.0.8 and cinnamon-session 2.0.4. No idea what can cause this importing issue? It is quite annoying that I cannot access any settings.

@mtwebster
Copy link
Member

I think it's a distro issue - they should change the dependency to python2-imaging.

@orschiro
Copy link
Author

orschiro commented Nov 6, 2013

@mtwebster

On Arch Linux python2-imaging was entirely replaced by python2-pillow and the first is considered depreciated. See this:

https://www.archlinux.org/todo/replace-pil-with-pillow/

I still believe the error must be somewhere in the settings daemon. Because if I run the python2 interpreter, then I can import the Image module:

~ $ python2 
Python 2.7.5 (default, Sep  6 2013, 09:55:21) 
[GCC 4.8.1 20130725 (prerelease)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from PIL import Image
>>> 

Any comments on that?

I just noticed that there is also a repo for the cinnamon-settings-daemon. Should I file the report there [1]?

[1] https://github.com/linuxmint/cinnamon-settings-daemon

@mtwebster
Copy link
Member

Hmm... so are you saying you use python 3 normally? We use python 2 still for everything.

@mtwebster
Copy link
Member

nevermind... it works in python3 here, if i fix the /usr/bin/cinnamon-settings file print statements. I'm a bit stumped, I'd have to set up an arch vm to figure it out - have you spoken with the arch maintainer? He hasn't mentioned any issues that I know of.

@mtwebster
Copy link
Member

https://projects.archlinux.org/svntogit/community.git/tree/trunk/PKGBUILD?h=packages/cinnamon#n40

Looks like the repo version is changing all calls from python to python2

@orschiro
Copy link
Author

orschiro commented Nov 6, 2013

On Arch Linux /usr/bin/python refers to python3 and /usr/bin/python2 to python2. But the shebang statement is corrected for that in the Arch Linux package as you say.

We already discussed the issue on the Arch Linux bugtracker [1] but nobody can reproduce the error.

That is why I believe the problem must be somewhere in the settings daemon and I lack an explanation why the interpreter can import the Image module but the settings-daemon cannot.

[1] https://bugs.archlinux.org/task/37289

@mtwebster
Copy link
Member

cinnamon-settings-daemon is sort of a misnomer - it's not directly interacting with cinnamon-settings at all. Its job is to map various system configuration settings, and map them to gsettings, as well as provide handlers for things like media keys, etc...

I'm not sure what's going on - if it works from an interpreter, it should work in the program itself.

@orschiro
Copy link
Author

orschiro commented Nov 6, 2013

Bummer. If even you run out of ideas, then I don't know what else to try. I remember that the whole issue started with Cinnamon 2.0. Was there any major change related to PIL between 1.x and 2.0?

@mtwebster
Copy link
Member

There aren't any arch VM images floating around I could quickly setup are there?

@orschiro
Copy link
Author

orschiro commented Nov 6, 2013

Can you use Virtualbox Images?

Have a look here: http://virtualboxes.org/images/archlinux/#arch20130801

Thanks for your effort! 👍

@mtwebster
Copy link
Member

Just made a new arch install, did pacman -S cinnamon:

capture

image

@orschiro
Copy link
Author

orschiro commented Nov 7, 2013

I don't understand this. I have all of your python2 packages installed:

python2
python2-atspi
python2-beaker
python2-bonobo
python2-cairo
python2-configobj
python2-dbus
python2-distutils-extra
python2-django
python2-gconf
python2-gflags
python2-gnomecanvas
python2-gnomekeyring
python2-gnomevfs
python2-gobject
python2-gobject2
python2-httplib2
python2-keyring
python2-libgnome
python2-lxml
python2-mako
python2-markupsafe
python2-notify
python2-pam
python2-pexpect
python2-pillow
python2-pyinotify
python2-secretstorage
python2-setuptools

I also tried removing and reinstalling all of them.

But the same result:

~ $ cinnamon-settings
No module named Image

Argh!

@orschiro
Copy link
Author

orschiro commented Nov 8, 2013

I created a new test user but the same error occurs there. Thus I would assume it is not a direct problem of my user config.

Can it be a dconf or gconf problem?

Can it be caused by some orphan .pyc files?

I found these ones on my system:

/usr/lib/cinnamon-settings/bin/capi.pyc
/usr/lib/cinnamon-settings/bin/ExtensionCore.pyc
/usr/lib/cinnamon-settings/bin/eyedropper.pyc
/usr/lib/cinnamon-settings/bin/SettingsWidgets.pyc
/usr/lib/cinnamon-settings/bin/Spices.pyc
/usr/lib/cinnamon-settings/bin/XletSettings.pyc
/usr/lib/cinnamon-settings/bin/XletSettingsWidgets.pyc
/usr/lib/cinnamon-settings/imtools.pyc
/usr/lib/cinnamon-settings/modules/cs_applets.pyc
/usr/lib/cinnamon-settings/modules/cs_backgrounds.pyc
/usr/lib/cinnamon-settings/modules/cs_calendar.pyc
/usr/lib/cinnamon-settings/modules/cs_default.pyc
/usr/lib/cinnamon-settings/modules/cs_desklets.pyc
/usr/lib/cinnamon-settings/modules/cs_desktop.pyc
/usr/lib/cinnamon-settings/modules/cs_effects.pyc
/usr/lib/cinnamon-settings/modules/cs_extensions.pyc
/usr/lib/cinnamon-settings/modules/cs_fonts.pyc
/usr/lib/cinnamon-settings/modules/cs_general.pyc
/usr/lib/cinnamon-settings/modules/cs_hotcorner.pyc
/usr/lib/cinnamon-settings/modules/cs_info.pyc
/usr/lib/cinnamon-settings/modules/cs_keyboard.pyc
/usr/lib/cinnamon-settings/modules/cs_menu.pyc
/usr/lib/cinnamon-settings/modules/cs_mouse.pyc
/usr/lib/cinnamon-settings/modules/cs_panel.pyc
/usr/lib/cinnamon-settings/modules/cs_screensaver.pyc
/usr/lib/cinnamon-settings/modules/cs_themes.pyc
/usr/lib/cinnamon-settings/modules/cs_tiling.pyc
/usr/lib/cinnamon-settings/modules/cs_user.pyc
/usr/lib/cinnamon-settings/modules/cs_windows.pyc
/usr/lib/cinnamon-settings/modules/cs_workspaces.pyc
/usr/lib/cinnamon-settings/tz.pyc

@orschiro
Copy link
Author

orschiro commented Nov 9, 2013

Yes! I resolved the issue. 👍

It was indeed caused by these old pyc files. Deleting all of them now successfully runs cinnamon-settings.

Should probably Cinnamon itself take care of outdated pyc files?

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

2 participants