Error while running

3 posts / 0 new
Last post
Yanchao Liu
Error while running


I tried running the evaluation script published at

without any modification, and got an error. Below is the run log containing the error message. Can someone help with this?




(C:\Users\gn0061\AppData\Local\Continuum\Anaconda3) C:\Users\gn0061\GoogleDrive\gamsdir\GridOpt\Evaluation-master\Evaluation-master>python .\examples\case2\case.raw .\examples\case2\case.rop .\examples\case2\case.con .\examples\case2\case.inl .\examples\case2\sol1.txt .\examples\case2\sol2.txt .\examples\case2\summary.csv .\examples\case2\detail.csv 
read raw time: 0
read rop time: 0
read con time: 0
read inl time: 0
buses: 2
loads: 1
fixed_shunts: 0
generators: 1
nontransformer_branches: 1
transformers: 0
areas: 1
switched_shunts: 1
generator inl records: 1
generator dispatch records: 1
active power dispatch records: 1
piecewise linear cost functions: 1
contingencies: 2
read sol_base time: 0
set data time: 0
set params time: 0
set sol1 time: 0
eval base time: 0
exception in
Traceback (most recent call last):
  File "", line 51, in <module>
  File "", line 41, in run
  File "C:\Users\gn0061\GoogleDrive\gamsdir\GridOpt\Evaluation-master\Evaluation-master\", line 2039, in run
  File "C:\Users\gn0061\GoogleDrive\gamsdir\GridOpt\Evaluation-master\Evaluation-master\", line 736, in write_header
TypeError: a bytes-like object is required, not 'str'

Total votes: 115
Dr. Stephen Elbert
Error while running

This appears to be a Python 2 vs. Python 3 problem. The evaluation script was writen for Python 2. The Readme file has been updated to reflect this.

Dr. Stephen Elbert
Error while running has been rewritten to be compatible with Python 2 and Python 3.