hhannine / superpaper

A cross-platform multi monitor wallpaper manager.
MIT License
1.12k stars 46 forks source link

dbus exception in kdeplasma_actions #5

Closed vyrus714 closed 5 years ago

vyrus714 commented 5 years ago

When applying a profile I get an exception and the wallpaper is never applied:

DESKTOP_SESSION is: '/usr/share/xsessions/plasma' Exception in thread Thread-1: Traceback (most recent call last): File "/usr/lib/python3.7/threading.py", line 917, in _bootstrap_inner self.run() File "/usr/lib/python3.7/threading.py", line 865, in run self._target(*self._args, **self._kwargs) File "superpaper.pyw", line 1095, in spanSingleImagePPIcorrection setWallpaper(outputfile) File "superpaper.pyw", line 1153, in setWallpaper setWallpaper_linux(outputfile) File "superpaper.pyw", line 1211, in setWallpaper_linux kdeplasma_actions(outputfile) File "superpaper.pyw", line 1281, in kdeplasma_actions sessionb = dbus.SessionBus() AttributeError: module 'dbus' has no attribute 'SessionBus'

I do have temp images in the temp folder, however any offsets i put into the profile don't apply until I quit out and restart the whole program (possibly some relevant thread crashes due to the above exception?). Not sure if it's related.

hhannine commented 5 years ago

On kde the dbus is used to set the wallpaper so no wonder it's not set at all. Are you running the release binary or the script?

hhannine commented 5 years ago

I just tested on my linux build machine and there I do have the SessionBus attribute in dbus as expected, so I have no idea what is going wrong on your end.

vyrus714 commented 5 years ago

Running with the script version. I made a simple script to test the SessionBus value in the dbus module. When specifying to run with python2 the attribute was there, but when i use python3 it is not. Strange, since the superpaper is written for python 3. I tested superpaper with python 2, just to see what would happen, and it spits out this error:

File "superpaper.pyw", line 2507 SyntaxError: Non-ASCII character '\xc3' in file superpaper.pyw on line 2507, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details

So it does seem to get further down, just eventually runs into something python2 doesn't like.

hhannine commented 5 years ago

Yeah there are multiple things relying on Python 3.

Sounds like there's something funky going on with your python 3 bindings to dbus, can you check that they're installed correctly and up to date?

vyrus714 commented 5 years ago

Sorry for the delay. Did a little digging and found that I had python2-dbus installed but not python-dbus. I did install this via an AUR snapshot someone put up, but had uninstalled & reinstalled when I switched to the script version as I remembered I needed those packages. So somewhere in there, I guess the python 3 version of the library didn't get installed. After I took care of that, I finally had no errors, and it did set the wallpaper! It only did that for the primary display though, and it had the wrong image, but I'll file another issue for that.