How do i fix "invalid error" in python 3?

142 views Asked by At

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.

1

There are 1 answers

0
mattmilten On

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.