Hello Cho,
I was able to reproduce your error using the PySSC from PySAM's most recent release as well as the PySSC distributed from SAM 2017.9.5. Unfortunately, that means it might take some time to dig into where the bug is coming from.
Depending on your workflow, I would suggest using PySAM's PySSC version which allows you to run a compute module such as PVWatts from a Python dictionary:
from PySAM.PySSC import PySSC, ssc_sim_from_dict
ssc = PySSC()
table = ssc.data_create()
ssc.data_set_number(table, b'lat', 37.95)
ssc.data_set_array(table, b'gh', (2.0, ) * 8760)
sim_dict = {'solar_resource_data': table,'array_type': 0.0, 'azimuth': 180.0, 'batt_simple_enable': 0.0, 'dc_ac_ratio': 1.2, 'en_snowloss': 0.0, 'gcr': 0.4, 'inv_eff': 96.0, 'losses': 14.0757, 'module_type': 0.0, 'system_capacity': 4.0, 'tilt': 20.0, 'adjust:constant': 0.0}
sim_dict.update({'tech_model': 'pvwattsv7', 'financial_model': 'None', 'system_capacity': 2.33})
ssc_sim_from_dict(sim_dict) # an error will be thrown because solar_resource_data is not complete
If you really prefer to keep with the old method and want to query the values from the table, here is a work-around:
from PySAM.PySSC import PySSC
import PySAM.Pvwattsv7 as pv
ssc = PySSC()
table = ssc.data_create()
ssc.data_set_number(table, b'lat', 37.95)
ssc.data_set_array(table, b'gh', (2.0, ) * 8760)
dat = ssc.data_create()
ssc.data_set_table(dat, b'solar_resource_data', table) # must be set to a valid SSC_TABLE/dictionary-type variable, otherwise the wrapping will fail
model = pv.wrap(dat)
print(model.SolarResource.solar_resource_data)
Best,
Darice