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

Unable to run Plyer notifications #830

Open
surapuramakhil opened this issue Jan 12, 2025 · 0 comments
Open

Unable to run Plyer notifications #830

surapuramakhil opened this issue Jan 12, 2025 · 0 comments

Comments

@surapuramakhil
Copy link

surapuramakhil commented Jan 12, 2025

from plyer import notification

def test_notifcaton():
    notification.notify(
        title="CAPTCHA Detected",
        message="Please solve the CAPTCHA to continue.",
        timeout=20  
    )

test_notifcaton()
job-hunt-assistant-py3.13(base) akhilsurapuram@Akhils-MacBook-Pro Auto_Jobs_Applier_AI_Agent % poetry env info

Virtualenv
Python:         3.13.1
Implementation: CPython
Path:           /Users/akhilsurapuram/Library/Caches/pypoetry/virtualenvs/job-hunt-assistant-Y6cxGshj-py3.13
Executable:     /Users/akhilsurapuram/Library/Caches/pypoetry/virtualenvs/job-hunt-assistant-Y6cxGshj-py3.13/bin/python
Valid:          True

Base
Platform:   darwin
OS:         posix
Python:     3.13.1
Path:       /Users/akhilsurapuram/.pyenv/versions/3.13.1
Executable: /Users/akhilsurapuram/.pyenv/versions/3.13.1/bin/python3.13
job-hunt-assistant-py3.13(base) akhilsurapuram@Akhils-MacBook-Pro Auto_Jobs_Applier_AI_Agent % poetry show plyer
 name         : plyer                                                    
 version      : 2.1.0                                                    
 description  : Platform-independent wrapper for platform-dependent APIs 
job-hunt-assistant-py3.13(base) akhilsurapuram@Akhils-MacBook-Pro Auto_Jobs_Applier_AI_Agent % poetry run python src/main.py --resume akhil_resume_SE.pdf
ENV: None
ENV: None
Traceback (most recent call last):
  File "/Users/akhilsurapuram/openSource/myContirubtions/clean_linkedIN/Auto_Jobs_Applier_AI_Agent/src/main.py", line 40, in <module>
    from ai_hawk.bot_facade import AIHawkBotFacade
  File "/Users/akhilsurapuram/openSource/myContirubtions/clean_linkedIN/Auto_Jobs_Applier_AI_Agent/src/ai_hawk/bot_facade.py", line 1, in <module>
    from ai_hawk.job_manager import AIHawkJobManager
  File "/Users/akhilsurapuram/openSource/myContirubtions/clean_linkedIN/Auto_Jobs_Applier_AI_Agent/src/ai_hawk/job_manager.py", line 29, in <module>
    import utils.browser_utils as browser_utils
  File "/Users/akhilsurapuram/openSource/myContirubtions/clean_linkedIN/Auto_Jobs_Applier_AI_Agent/src/utils/browser_utils.py", line 145, in <module>
    test_notifcaton()
    ~~~~~~~~~~~~~~~^^
  File "/Users/akhilsurapuram/openSource/myContirubtions/clean_linkedIN/Auto_Jobs_Applier_AI_Agent/src/utils/browser_utils.py", line 139, in test_notifcaton
    notification.notify(
    ~~~~~~~~~~~~~~~~~~~^
        title="CAPTCHA Detected",
        ^^^^^^^^^^^^^^^^^^^^^^^^^
        message="Please solve the CAPTCHA to continue.",
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        timeout=20
        ^^^^^^^^^^
    )
    ^
  File "/Users/akhilsurapuram/Library/Caches/pypoetry/virtualenvs/job-hunt-assistant-Y6cxGshj-py3.13/lib/python3.13/site-packages/plyer/facades/notification.py", line 84, in notify
    self._notify(
    ~~~~~~~~~~~~^
        title=title, message=message,
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        app_icon=app_icon, app_name=app_name,
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        timeout=timeout, ticker=ticker, toast=toast, hints=hints
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    )
    ^
  File "/Users/akhilsurapuram/Library/Caches/pypoetry/virtualenvs/job-hunt-assistant-Y6cxGshj-py3.13/lib/python3.13/site-packages/plyer/platforms/macosx/notification.py", line 38, in _notify
    usrnotifctr.setDelegate_(self)
    ^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'setDelegate_'
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

1 participant