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

Plugin crashes Thread when using Master Station #60

Open
seventer opened this issue Jul 25, 2022 · 3 comments
Open

Plugin crashes Thread when using Master Station #60

seventer opened this issue Jul 25, 2022 · 3 comments

Comments

@seventer
Copy link
Contributor

When using a Master Station (postive and/or negative seconds) the plugin crashes the program thread resulting in unresponsive stations.
The crashdump is:

Exception in thread Thread-1:
Traceback (most recent call last):
  File "/usr/lib/python3.9/threading.py", line 954, in _bootstrap_inner
    self.run()
  File "/usr/lib/python3.9/threading.py", line 892, in run
    self._target(*self._args, **self._kwargs)
  File "/home/pi/SIP/sip.py", line 188, in timing_loop
    report_running_program_change()
  File "/home/pi/SIP/helpers.py", line 90, in report_running_program_change
    running_program_change.send()
  File "/home/pi/SIP/blinker/base.py", line 266, in send
    return [(receiver, receiver(sender, **kwargs))
  File "/home/pi/SIP/blinker/base.py", line 266, in <listcomp>
    return [(receiver, receiver(sender, **kwargs))
  File "/home/pi/SIP/plugins/sip_email.py", line 153, in email_start_stop
    if gv.pd[p_idx]["name"]:
IndexError: list index out of range

if gv.pd[p_idx]["name"]:

Tested with a Master Station enabled and using Run Once on a single station

@Dan-in-CA
Copy link
Owner

The error is being caused by the email plugin.
I'll take a look at it.
Dan

@Dan-in-CA
Copy link
Owner

That looks like a bug that has been there since program naming was added.
It was looking for a program name in the program data dictionary when run-once and manual mode don't have a data dictionary.
Fixed now.
Thanks Gerard for discovering this.

@seventer
Copy link
Contributor Author

It works fine now. Both the Run-now and program tested. However the e-mail content has some cosmetic issues but I will do some more testing and create a new issue for it.

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