TiZ-HugLife / xfce4-dockbarx-plugin

A plugin that embeds DockbarX into Xfce4-panel
MIT License
70 stars 14 forks source link

Plugin fails with module dockbarx.log ImportError #37

Closed moxli closed 5 years ago

moxli commented 5 years ago

Hi,

I have installed through the following PPA: https://launchpad.net/~xuzhen666/+archive/ubuntu/dockbarx

I am running on xUbuntu 19.04 with the following package versions:

mdorner@lt1858  ~  dpkg -s xfce4-dockbarx-plugin | rg '^Version:'
Version: 0.4.1+git20160817-1~disco1

 mdorner@lt1858  ~  dpkg -s dockbarx | rg '^Version:'        
Version: 0.93+git20190103-1~ppa3

I can start dockx without the plugin, however adding the DockbarX Plugin to my panel does not seem to do anything.

I have killed my xfce4-panel and started it through the command line.

The following error popped up:

Traceback (most recent call last):
  File "/usr/share/xfce4/panel/plugins/xfce4-dockbarx-plug", line 21, in <module>
    from dockbarx.log import *; log_to_file()
ImportError: No module named dockbarx.log
juraisa commented 5 years ago

Having the same issue here, I've tried building it manually, using xuzhen666's repo, nothing has gotten it to work, been broken for awhile. On xUbuntu 18.04 atm, following in hopes of a fix

juraisa commented 5 years ago

I was able to finally sort this issue out at least in my case.

I had linuxbrew installed for some dev work in the past and linuxbrew had installed it's own version of python2.7 which becomes the default python environment when not sudo'd

Due to how dockbar installs it's python libraries, the linuxbrew installation has no reference that the dockbar libs exists, it expects libraries to exist at

/home/linuxbrew/.linuxbrew/Cellar/python@2/2.7.15_1/lib/python2.7

while dockbarx installs it's libs to the system python library directory at

/usr/local/lib/python2.7/dist-packages/dockbarx

since xfce4-panel invokes as the user, it was running the linuxbrew version which never gets the dockbarx libraries. I no longer needed linuxbrew personally, so I uninstalled it per https://docs.brew.sh/FAQ and then reloaded my bashrc, once that was done the plugin loaded up fine

Alternatively I imagine that you could copy the /usr/local/lib/ libraries I mentioned above (adjust for your python version) into the linuxbrew path and retain it if you wanted.

Hope this helps, took me awhile to finally buckle down and sort this out.

Note: when I fixed this, I did manually install both dockbarx and the xfce4-dockbarx-plugin from copies from git, I imagine the ppa's would work fine though once you fix the library pathing problem.

moxli commented 5 years ago

Thanks for your research. That seems to be my problem, how do I check which python version/libs are used to execute something?

Copying the .py files from my dockbarx installation to /home/linuxbrew/.linuxbrew/Cellar/python@2/2.7.15_1/lib/python2.7 does not seem todo anything. The error stays the same

TiZ-HugLife commented 5 years ago

Leave it to Linuxbrew to screw things up. When I briefly messed with it, the same thing happened to me. You're not gonna get anywhere trying to run DBX in Linuxbrew's python, because there aren't any GTK bindings there.

Honestly with how screwed up Linuxbrew is, you're better off making sure Linuxbrew's bin is last on your PATH environment variable.

Since this is a very unsupported configuration, I'm closing.

moxli commented 5 years ago

That’s totally fair thanks again!