Describe the bug
after updating by git pull, my bazarr doesn't start anymore
Error
File "/opt/bazarr/bazarr/main.py", line 19, in <module>
import apprise
File "/opt/bazarr/bazarr/../libs/apprise/__init__.py", line 46, in <module>
from .plugins.NotifyBase import NotifyBase
File "/opt/bazarr/bazarr/../libs/apprise/plugins/__init__.py", line 186, in <module>
__load_matrix()
File "/opt/bazarr/bazarr/../libs/apprise/plugins/__init__.py", line 102, in __load_matrix
fromlist=[plugin_name])
File "/opt/bazarr/bazarr/../libs/apprise/plugins/NotifyGnome.py", line 43, in <module>
gi.require_version("Notify", "0.7")
AttributeError: 'module' object has no attribute 'require_version'
Software (please complete the following information):
Additional context
Add any other context about the problem here.
@caronc Do you have any idea why we get this issue with latest apprise? Thanks!
Hi guys!
There appears to be a conflicting gi python module in the PYTHONPATH or a python script in the PATH such as /bin, /usr/bin, etc . The Gnome plugin would have otherwise gracefully load if it was missing (apprise gracefully handles this). However, if gi _is_ detected and can be imported, it calls a core function that is a part of it next (the _require_version()_ function).
The fact apprise can't find the function means the import itself was _rogue_. It suggests 2 options:
gi file causing you issues and simply delete/rename it so the real one can be sourced. This here is the ideal solution as you may experience other side effects if other python libraries reach out to this module under the hood too.apprise/plugins/ directory and roll with one less. This similar calls are made in NotifyDBus.py as well, so you'll probably have to scrap that one too.I'd be shocked if rolling back to an earlier version of apprise fixed this though. _I personally believe something else has been unexpectedly introduced into the environment._
Anyway, let me know your thoughts! 馃檪
fixed it by deleting all pi and pygobject modules.
first by apt-get purge, after that pip and pip3 uninstall
there is no gi or pygobject anymore on my system, bazarr is running again
@caronc Thanks for the help!
Should I add gi to the inclued module in Bazarr sources? Which version would you recommend?
@morpheus65535 It's perfectly normal to not have the gi object (as most windows distributions wouldn't want it). It's only for hooking into GTK and other binary streaming protocols.
I personally think there was just something unique about the persons environment who opened the ticket and it's great to see they got it resolved. I personally wouldn't change anything at all on your side. I certainly would advise against adding PyGObject into your sources only because it additionally requires some compiling and sources some C libraries it builds.
@caronc I totally agree with you and thank you for the help!