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

NoneType attribute label exception on Skybox inverter query #99

Open
rpdrewes opened this issue Nov 11, 2020 · 2 comments
Open

NoneType attribute label exception on Skybox inverter query #99

rpdrewes opened this issue Nov 11, 2020 · 2 comments

Comments

@rpdrewes
Copy link

Running suns.py on my Outback Skybox inverter starts to retrieve good data, but then gets an exception:

      [many lines...]
      External Battery Voltage (V):                        54 V         
      Total DC Current (A):                                 0 A         
      Total Power (W):                                      0 W         
      Set Operation (SetOp):                                1           
      Set Inverter State (SetInvState):                     1           
Traceback (most recent call last):
  File "pysunspec/scripts/suns.py", line 91, in <module>
    if model.model_type.label:
AttributeError: 'NoneType' object has no attribute 'label'

If I just put a check in suns.py to continue if the object is None, I can avoid the error and the query keeps getting good data.

This may be the Skybox's fault returning data with some fields not populated, but it might be a good idea to program more defensively and put in a check in the code?

@shelcrow
Copy link
Collaborator

Can you please try with pysunspec2 and see if you get the same error? We are deprecating pysunspec.

@rpdrewes
Copy link
Author

I installed sunspec2 that but it isn't clear how to do an equivalent test yet. Standby.

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