Skip to content

Unable to run Plyer notifications #830

@surapuramakhil

Description

@surapuramakhil
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_'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions