You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
pync.notify doesn't work in python scripts used by launchd, but works when the python script is directly executed.
So I have python script in /Users/tscp/testdir/test-pync/test_pync.py:
#!/usr/local/bin/python3.8importpyncimportsysprint('before')
pync_imported='pync'insys.modulesprint(f'pync is imported: {pync_imported}')
pync.notify('test pync')
print('after')
It works as expected (a notification is shown) when run with ./test_pync.py, but doesn't run in my launchd job /Users/tscp/Library/LaunchAgents/test_pync.plist:
If you install terminal-notifer via homebrew and call directly with os.system for example it works; however the $PATH variable must be set inside the launchd plist file.
Describe the bug
pync.notify doesn't work in python scripts used by launchd, but works when the python script is directly executed.
So I have python script in
/Users/tscp/testdir/test-pync/test_pync.py
:It works as expected (a notification is shown) when run with
./test_pync.py
, but doesn't run in my launchd job/Users/tscp/Library/LaunchAgents/test_pync.plist
:This is the content of
/tmp/local.job.stdout
after the job is loaded:The script seemed to run successfully but the notification was not shown.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
A notification like this is shown when the job is loaded and run:
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: