python error

11 posts / 0 new
Last post
stef
python error

Hi ,
I generate code pyton with SAM, but doesn''t work when I execude a code.
syntax error (ssc.data_set_matrix( data, b'subarray1_shading:mxh', subarray1_shading:mxh );

any idea ?

regards
stef

Paul Gilman

Dear Stef,

Could you attach the .sam file you used to generate the Python code to your original post above (edit the post to attach another file). It looks like there might be too many spaces in the subarray_shading:mxh arrays.

Best regards,
Paul.

stef

Hi Paul,
Thank you for your answer. The file's uploade on the last post.
regards
SR

stef

Note that the errors are due to a parametric simulation

alsagria1

May I know how to convert your SAM model to Python?

Paul Gilman

Please see the video in this discussion:

https://sam.nrel.gov/node/75009

Best regards,
Paul.

stef

Hello,
Thank you fo your answer, I followed the instructions in the video but I always got the error?

stef
stef
stef

Hello,

FIX it !!! Sorry for the inconvenience, I replace double dot (:) by underscore (_)
regards
Stef

Paul Gilman

Thank you for letting us know. Let me know if you have any other problems.

Best regards,
Paul.

Theme by Danetsoft and Danang Probo Sayekti inspired by Maksimer