PySAM: exec fail(pvwattsv7): first two header lines must have same number of c

  • AC Capehart
  • Topic Author
More
21 Oct 2022 20:12 #11597 by AC Capehart
We just recently started having a problem where we're getting the following error:

Traceback (most recent call last):
  File "/home/capehart/pysamtest.py", line 16, in <module>
    system_model.execute(0)
Exception: pvwattsv7 execution error.
    exec fail(pvwattsv7): first two header lines must have same number of columns

We assumed that it was related to github.com/NREL/SAM/issues/1186 because an erroneous tmy.csv download could reasonably kick off that error, but when we look at the files we have, they do appear to have the same number of columns.  Here is a minimal sample code causing the error.
from PySAM import Pvwattsv7 as Pv

system_model = Pv.new()
#system_model.SolarResource.solar_resource_file = "./nsrdb_36.0_-115.24_psm3-tmy_60_tmy.csv"
system_model.SolarResource.solar_resource_file = "./nsrdb_38.81_-77.26_psm3-tmy_60_tmy_zpexne.csv"
system_model.SystemDesign.array_type = 1
system_model.SystemDesign.azimuth = 180
system_model.SystemDesign.inv_eff = 99
system_model.SystemDesign.losses = 14.075660688264469
system_model.SystemDesign.module_type = 0
system_model.SystemDesign.system_capacity = 8
system_model.SystemDesign.tilt = 20
system_model.Lifetime.system_use_lifetime_output = 0
system_model.AdjustmentFactors.constant = 0
I'm attaching two sample tmy csv's.

Does anyone have any guidance for us on this? This is affecting customers and I'm keen to get it remedied promptly.

Thanks!
AC

Please Log in or Create an account to join the conversation.

  • Paul Gilman
More
24 Oct 2022 21:24 #11600 by Paul Gilman
Hi AC,

I think you attached two copies of the same CSV weather file. Also, your sample code (I appreciate the minimal sample) does not execute the Pvwattsv7 module, so I'm not sure if part of it is missing.

Best regards,
Paul.

Please Log in or Create an account to join the conversation.

  • AC Capehart
  • Topic Author
More
27 Oct 2022 19:13 #11609 by AC Capehart
Paul,

Thanks for the reply! I did, in fact, forget the very last line of the sample code to reproduce the error, the execution as you point out:
system_model.execute(0)

And apologies for the double-tmy entry.  I'll attach the other one that I meant to earlier, but this was happening universally for us.

The response you gave @ghazi-git on 1186 helped us out so that we've worked around this, so this is no long as desperate as when I first messaged. :)

Cheers,
AC

Please Log in or Create an account to join the conversation.

  • Paul Gilman
More
31 Oct 2022 18:13 #11623 by Paul Gilman
Hi AC,

Thanks for letting us know.

The NSRDB API service has been fixed to resolve this issue with the missing version numbers in some files.

Best regards,
Paul.

Please Log in or Create an account to join the conversation.

Moderators: Paul Gilman
Powered by Kunena Forum