Hi,
I want to develop my owm phyton code about Wind power model using SAM's 'Generate Code' tool.
The problem is that original phyton code created by 'Generate Code' tool doesn`t work.
The message error is:
Traceback (most recent call last):
File "C:\Users\USUARIO\Desktop\MyWork\ParaScript.py", line 373, in <module>
if ssc.module_exec(module, data) == 0:
File "C:\Users\USUARIO\Desktop\MyWork\PySSC.py", line 165, in module_exec
return self.pdll.ssc_module_exec( c_void_p(p_mod), c_void_p(p_data) )
OSError: exception: access violation reading 0x0000000000000000
I have been debbuging code and I have found that problem is in LandBosse model.
See phyton code in PySCC.py file:
ssc.module_free(module)
module = ssc.module_create(b'wind_landbosse')
ssc.module_exec_set_print( 0 );
if ssc.module_exec(module, data) == 0:
print ('wind_landbosse simulation error')
idx = 1
msg = ssc.module_log(module, 0)
while (msg != None):
print (' : ' + msg.decode("utf - 8"))
msg = ssc.module_log(module, idx)
idx = idx + 1
SystemExit( "Simulation Error" );
If I comment this code using # symbol then the algoritm works OK.
Please help me to find a solution to run this LandBosse Model.
Thanks,
Ivan