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

No working in new MacOS versions #2

Closed
hamidfzm opened this issue Dec 30, 2022 · 3 comments
Closed

No working in new MacOS versions #2

hamidfzm opened this issue Dec 30, 2022 · 3 comments

Comments

@hamidfzm
Copy link

I checked both in Ventura & Monetery. It doesn't work in new versions. Not a MacOS expert but happy to contribute if you point me in right direction to solve this.

@Who23
Copy link
Owner

Who23 commented Dec 30, 2022

Unfortunately I can't reproduce the error on my machine (Monterey 12.2.1). Mind sharing your logs in /opt/homebrew/var/log/nchook/nchook.err.log and /opt/homebrew/var/log/nchook/nchook.out.log? You might want to censor / remove some log entries with notifications that have personal information.

@hamidfzm
Copy link
Author

hamidfzm commented Dec 30, 2022

Exception in thread Thread-1:
Traceback (most recent call last):
  File "/opt/homebrew/Cellar/python@3.9/3.9.16/Frameworks/Python.framework/Versions/3.9/lib/python3.9/threading.py", line 980, in _bootstrap_inner
    self.run()
  File "/opt/homebrew/Cellar/nchook/0.1.0/libexec/lib/python3.9/site-packages/watchdog/observers/api.py", line 199, in run
    self.dispatch_events(self.event_queue, self.timeout)
  File "/opt/homebrew/Cellar/nchook/0.1.0/libexec/lib/python3.9/site-packages/watchdog/observers/api.py", line 372, in dispatch_events
    handler.dispatch(event)
  File "/opt/homebrew/Cellar/nchook/0.1.0/libexec/lib/python3.9/site-packages/watchdog/events.py", line 272, in dispatch
    {
  File "/opt/homebrew/opt/nchook/bin/nchook", line 47, in on_modified
    new_objs = [(col[0], process_plist(col[1]))
  File "/opt/homebrew/opt/nchook/bin/nchook", line 47, in <listcomp>
    new_objs = [(col[0], process_plist(col[1]))
  File "/opt/homebrew/opt/nchook/bin/nchook", line 86, in process_plist
    "time": notif_plist["date"] + 978307200
KeyError: 'date'

Same issue on two different devices

@Who23
Copy link
Owner

Who23 commented Jan 15, 2023

Apologies for the late response!

I'm not sure why this is happening - I don't know why a notification wouldn't have a date property, and I can't reproduce the issue. But I've published a new release that doesn't assume the plist has any properties. Could you re-install with homebrew, and if it still occurs, try the fix suggested in #1 ?

@Who23 Who23 closed this as completed Nov 11, 2023
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants