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

did it support mac? #87

Closed
csrgxtu opened this issue Aug 29, 2016 · 16 comments
Closed

did it support mac? #87

csrgxtu opened this issue Aug 29, 2016 · 16 comments

Comments

@csrgxtu
Copy link

csrgxtu commented Aug 29, 2016

did it support mac?

@minhoryang
Copy link

https://github.com/dschep/ntfy#mac-os-x-notification-center---darwin

@dcoeurjo
Copy link

I don't know if my issue is related to you.. However, on a ntfyfresh install using pip, when I ntfy -b darwin send "helloworld", I got this:

ERROR: Failed to send notification using darwin
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/site-packages/ntfy/__init__.py", line 48, in notify
    **backend_config)
  File "/usr/local/lib/python2.7/site-packages/ntfy/backends/darwin.py", line 6, in notify
    import Foundation
ImportError: No module named Foundation

any idea?

@dschep
Copy link
Owner

dschep commented Aug 29, 2016

Hmm. What version of MacOS? It doesn't look like you installed it in a virtualenv.. so I'm not really sure. I'm pretty limited in my debugging capabilities tho since I don't use a Mac.

@dcoeurjo
Copy link

I'm on the MacOS Sierra beta. It could be related to my issue but ntfy works fine with pushbullet for instance

@dschep
Copy link
Owner

dschep commented Aug 29, 2016

Hrmm. Yeah I really don't know how I'll test that 😉

@dcoeurjo
Copy link

I'll try with another Mac (El Capitan MacOs) to check if I can reproduce my bug.. BTW, thanks @dschep btw, nice tool

@dcoeurjo
Copy link

On Sierra, everything seems to work after a pip install pyobjc 🎉

@dschep
Copy link
Owner

dschep commented Aug 29, 2016

Cool. Does that install cleanly & work on older versions of MacOS too? If so I'll add a conditional dependency like Windows has: https://github.com/dschep/ntfy/blob/master/setup.py#L9

@dcoeurjo
Copy link

I'll try and keep you in touch.

@gibsjose
Copy link

I can confirm I get the same issues on OS X El Capitan.

Installing pyobjc as we speak. It's taking forever, though.

Looking at the installation instructions for pyobjc, it looks like it tries to constantly install pyobjc-core, so you have to install with:

$ pip install -U pyobjc-core
$ pip install -U pyobjc

@gibsjose
Copy link

Works great after installing pyobjc!

And indeed, it takes on the order of 2-3 minutes to install pyobjc using the two-step process above, whereas it takes nearly an hour to install it if you just naïvely run pip install pyobjc.

@dcoeurjo
Copy link

I confirm (pyobjc required also on El Capitan). Thanks for the -U tip 😃

@dschep
Copy link
Owner

dschep commented Aug 30, 2016

Thanks guys! I'll update the setup.py.

@austinbutler
Copy link

austinbutler commented Jan 9, 2017

Did this ever make it into the released version? Just got the same error and had to install these dependencies manually on El Capitan.

ERROR: Failed to send notification using default
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/ntfy/backends/default.py", line 20, in notify
    module.notify(title=title, message=message, **kwargs)
  File "/usr/local/lib/python3.6/site-packages/ntfy/backends/darwin.py", line 6, in notify
    import Foundation
ModuleNotFoundError: No module named 'Foundation'

During handling of the above exception, another exception occurred:


Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/ntfy/__init__.py", line 65, in notify
    **backend_config)
  File "/usr/local/lib/python3.6/site-packages/ntfy/backends/default.py", line 22, in notify
    raise DefaultNotifierError(e, module)
ntfy.backends.default.DefaultNotifierError: (ModuleNotFoundError("No module named 'Foundation'",), <
module 'ntfy.backends.darwin' from '/usr/local/lib/python3.6/site-packages/ntfy/backends/darwin.py'>
)

Works after pip3 install pyobjc-core pyobjc.

@fuzzy76
Copy link

fuzzy76 commented Jan 9, 2017

It did, but was removed again in 92af467 due to #122 so the last release shipped without.

... And was later readded in e753c96 , but that haven't been released yet.

@dschep
Copy link
Owner

dschep commented Jan 9, 2017

Yeah I added it back to the deps since PyObjc was updated (had someone else test install it for me). I should probably cut a new release (need to fix the build first)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants