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

Mistake in gamY when defining a variable without label, correcting, and re-running code #21

Open
akgdreammodel opened this issue Sep 3, 2024 · 0 comments

Comments

@akgdreammodel
Copy link

akgdreammodel commented Sep 3, 2024

If you define a new variable without a label, you get the warning

gamY could not process the file due to the following error: "VAR" was defined as a new variable without an explanatory text in group "GROUP" (this might be due to a typo).

This works as intended. If you then update your gams code such that variable has a label, e.g.:

VAR "label"

one obtains an error of the following form

At line:1 char:35
+ run("calib_baselineinclsolar.gms",r="Saved/calib_abtement_agrEOP", s= ...
+ ~
Missing expression after ','.
At line:1 char:35
+ ... "calib_baselineinclsolar.gms",r="Saved/calib_abtement_agrEOP", s="Sav ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Unexpected token 'r="Saved/calib_abtement_agrEOP"' in expression or statement.
At line:1 char:35
+ run("calib_baselineinclsolar.gms",r="Saved/calib_abtement_agrEOP", s= ...
+ ~
Missing closing ')' in expression.
At line:1 char:101
+ ... ",r="Saved/calib_abtement_agrEOP", s="Saved/calib_baselineinclsolar")
+ ~
Unexpected token ')' in expression or statement.
+ CategoryInfo : ParserError: (:) [], ParentContainsErrorRecordException
+ FullyQualifiedErrorId : MissingExpressionAfterToken

If one restarts Python, the error disappears and the code runs as intended.

KH ASBJOERN (sent from my iPhone)

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

1 participant