OS X crash when sending notification #6
Labels
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: Rinaldus/mail-notifier#6
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Hello.
I got the following crash on OS X 10.11 when there's unread letters:
I might be missing some dependencies but the only one required according to Readme is PyQt5 which I have installed via Homebrew.
Please, check my last commit
6ccb04632b
. It seems that OS X have not 'notify-send' command. I changed the way to send notifications. Now the program requires additional library notify2 as dependency. Install it and it should be work.Thanks for prompt response. I pulled latest changes, installed
notify2
, and now I get following error:There are some people having similar problems i.e. https://stackoverflow.com/questions/37521162/how-solve-importerror-no-module-named-dbus
But none of the proposed solutions worked for me, including installing
dbus
package via Homebrew.Try to install the program in virtualenv. Follow the instructions to install virtualenv, activate it and install
PyQt5
,notify2
and probablydbus
inside of virtualenv.Did you try to install dbus-python via pip?
Installation fails without clear reason and a lot of junk output. I'm trying to dig through logs..
It seems there was relevant package in Homebrew but it got removed at some point. There are some outdated instructions online that recommend installing
brew install homebrew/python/python-dbus
I'll try downloading sources and installing it manually
I've made some progress but it still doesn't work.
To properly use
notify2
on OS X you have to installdbus
with Homebrew:Then:
But I still have an error when trying to launch
mail-notifier.py
:It seems that dbus service is not properly registered in the system. Other people had this problem https://github.com/fr31/spotifylyrics/issues/19#issuecomment-242543039 but no workaround as far as I can tell.
I made quick fix to prevent crashing if OS notification is different than Linux. Baloon notification won't work, but it will print notification to console output (better, than nothing) instead and it won't crash. Please, test this commit.
I will continue to work on this problem, but I'm not sure, that I succeed to resolve it and it won't be soon.
It still crashes because right now notify2 initialization is the problem. You'll have to make it conditional, probably including
import notify2
which I'm not sure how to do...I will also try to resolve service error and update this issue if I find a solution.
Ok, I came back to first notification method (which using
notify-send
), but added try: ... except: ... to prevent crashing. Please, checkb04cb9a6ff
, is it workable? You should see notification in terminal output instead of baloon.Yes, this is working.
Thanks.
I have one idea how to solve this problem, but I need to install OS X in Virtual Box and understand how it works there. It will take some time.
Thanks, I'll keep an eye out for updates.
But I think this issue should be closed. The crash was a bug, and it's fixed now that you handle OS X notifications issue gracefully.