-2

My programm show one error about syntax of the following line code: runfile('D:/Mon Amour/Codes HPP and Thermal/My World/codes of hydro/Gurobi_python_hydro_scheduling/Gurobi_Python_Hydro_Scheduling-master/SDDP_Model.py', wdir='D:/Mon Amour/Codes HPP and Thermal/My World/codes of hydro/Gurobi_python_hydro_scheduling/Gurobi_Python_Hydro_Scheduling-master') Traceback (most recent call last):

File "C:\Users\dell\Anaconda3\lib\site-packages\IPython\core\interactiveshell.py", line 3296, in run_code exec(code_obj, self.user_global_ns, self.user_ns)

File "", line 1, in runfile('D:/Mon Amour/Codes HPP and Thermal/My World/codes of hydro/Gurobi_python_hydro_scheduling/Gurobi_Python_Hydro_Scheduling-master/SDDP_Model.py', wdir='D:/Mon Amour/Codes HPP and Thermal/My World/codes of hydro/Gurobi_python_hydro_scheduling/Gurobi_Python_Hydro_Scheduling-master')

File "C:\Users\dell\Anaconda3\lib\site-packages\spyder_kernels\customize\spydercustomize.py", line 786, in runfile execfile(filename, namespace)

File "C:\Users\dell\Anaconda3\lib\site-packages\spyder_kernels\customize\spydercustomize.py", line 110, in execfile exec(compile(f.read(), filename, 'exec'), namespace)

File "D:/Mon Amour/Codes HPP and Thermal/My World/codes of hydro/Gurobi_python_hydro_scheduling/Gurobi_Python_Hydro_Scheduling-master/SDDP_Model.py", line 459 for j in junction : ^ SyntaxError: invalid syntax Please help me to correct this.

  • Hello! Please try to come up with a minimal reproducible example (https://stackoverflow.com/help/minimal-reproducible-example) so we can be of any help. Fore example by sharing the contents of the `Gurobi_Python_Hydro_Scheduling-master/SDDP_Model.py` file. – pchtsp Aug 11 '20 at 09:19

1 Answers1

0

There is something wrong with your Python code in line 459:

line 459 for j in junction : ^ SyntaxError: invalid syntax

Without seeing the code, it's impossible to help you. Please always read error messages carefully - they are printed for a reason.

mattmilten
  • 6,242
  • 3
  • 35
  • 65