Repository: e2nIEE/pandapower

Issue:
KeyError: 'bus'
https://github.com/jhmenke/grid2op_pp_baseline/issues/5#issuecomment-659296433


Discussion:
There is a problem with the powermodels update and the pandapower interface. Could you install the pandapower develop version from Github and try? This may work I guess
Just tried it with the latest version from Github. Unfortunately the problem was **not** solved.
Ok, what is the convergence status of powermodels?

If the model is infeasible, there is no solution and "bus" cannot be read from the results. I just realized there is no exception for this within a time series calculation. If you enable verbosity in the powermodels output you should get something like
`Model may be infeasible or unbounded.`
Where can I enable verbosity in the powermodels?
when calling `pp.runpm` you can set 'pm_log_level` to `1` for example:

https://pandapower.readthedocs.io/en/v2.2.2/opf/powermodels.html?highlight=runpm(#pandapower.runpm 

Then you should get more information about the solver
<details>
  <summary>Log</summary>

```
┌ Warning: `with_optimizer` is deprecated. Adapt the following example to update your code:
│ `with_optimizer(Ipopt.Optimizer, max_cpu_time=60.0)` becomes `optimizer_with_attributes(Ipopt.Optimizer, "max_cpu_time" => 60.0)`.
│   caller = ip:0x0
└ @ Core :-1
Losses avoided: 1.329 MW (max. loading: 0.0% [-0.0%] / Trafo: 60.7% [-4.5%])
OPF wants to disconnect: pp_[29, 31, 34, 43, 44] / connect: pp_[] 
Observation: Line 44 out of service!
WARNING: replacing module PP2PM.
┌ Warning: NLP couldn't be solved to optimality
└ @ Juniper ~/.julia/packages/Juniper/Hm6I1/src/fpump.jl:393
Losses avoided: 1.063 MW (max. loading: 0.0% [-0.0%] / Trafo: 61.8% [-4.3%])
OPF wants to disconnect: pp_[] / connect: pp_[] 
Observation: Line 44 out of service!
WARNING: replacing module PP2PM.
┌ Warning: NLP couldn't be solved to optimality
└ @ Juniper ~/.julia/packages/Juniper/Hm6I1/src/fpump.jl:393
Losses avoided: 1.033 MW (max. loading: 0.0% [-0.0%] / Trafo: 57.9% [-9.3%])
OPF wants to disconnect: pp_[5, 6, 13, 29, 30, 31, 34, 43] / connect: pp_[] 
Observation: Line 43 out of service!
Observation: Line 44 out of service!
WARNING: replacing module PP2PM.
┌ Warning: NLP couldn't be solved to optimality
└ @ Juniper ~/.julia/packages/Juniper/Hm6I1/src/fpump.jl:393
Losses avoided: 0.931 MW (max. loading: 0.0% [-0.0%] / Trafo: 57.7% [-10.0%])
OPF wants to disconnect: pp_[5, 6, 29, 30, 31, 34] / connect: pp_[] 
Observation: Line 34 out of service!
Observation: Line 43 out of service!
WARNING: replacing module PP2PM.
┌ Warning: NLP couldn't be solved to optimality
└ @ Juniper ~/.julia/packages/Juniper/Hm6I1/src/fpump.jl:393
┌ Warning: Only almost solved
└ @ Juniper ~/.julia/packages/Juniper/Hm6I1/src/BnBTree.jl:89
Losses avoided: 0.742 MW (max. loading: 0.0% [-0.0%] / Trafo: 63.8% [-4.8%])
OPF wants to disconnect: pp_[] / connect: pp_[44] 
Observation: Line 34 out of service!
Observation: Line 43 out of service!
WARNING: replacing module PP2PM.
┌ Warning: NLP couldn't be solved to optimality
└ @ Juniper ~/.julia/packages/Juniper/Hm6I1/src/fpump.jl:393
Losses avoided: 0.666 MW (max. loading: 0.0% [-0.0%] / Trafo: 64.5% [-4.9%])
OPF wants to disconnect: pp_[] / connect: pp_[] 
Observation: Line 34 out of service!
WARNING: replacing module PP2PM.
--------

ERROR: Your agent could not be run. 
It will probably fail on codalab.
Here is the information we have:

INFO: the backend used in codalab is "LightSimBackend" which is not available on your system. Please visit "https://github.com/BDonnot/lightsim2grid" to install it. NB results difference between native backend (PandaPowerBackend) and LightSimBackend are below 1e-5 in most cases.
input dir: /home/alwin/PycharmProjects/l2rpn-challenge/submission/input_data_local/
output dir: utils/last_submission_results/res
program dir: /home/alwin/PycharmProjects/l2rpn-challenge/submission/utils/ingestion_program_local/
submission dir: /tmp/tmpw37mtgjv
input content ['prods_charac.csv', '__pycache__', 'grid_layout.json', 'difficulty_levels.json', '.TODO', 'chronics', 'config.py', 'grid.json']
output content []
program content ['metadata', 'config_local.json', 'ingestion.py']
Content received by codalab: ['metadata', 'submission']

INFO: No custom reward for the assessment of your agent will be used.


INFO: No custom other_rewards for the assessment of your agent will be used.


WARNING: Could not load lightsim2grid.LightSimBackend, falling back on PandaPowerBackend

[info | PowerModels]: removing 1 cost terms from generator 4: Any[1.0, 0.0]
[info | PowerModels]: removing 1 cost terms from generator 1: Any[1.0, 0.0]
[info | PowerModels]: removing 3 cost terms from generator 12: Any[]
[info | PowerModels]: removing 1 cost terms from generator 20: Any[1.0, 0.0]
[info | PowerModels]: removing 3 cost terms from generator 2: Any[]
[info | PowerModels]: removing 3 cost terms from generator 6: Any[]
[info | PowerModels]: removing 1 cost terms from generator 22: Any[1.0, 0.0]
[info | PowerModels]: removing 1 cost terms from generator 11: Any[1.0, 0.0]
[info | PowerModels]: removing 3 cost terms from generator 13: Any[]
[info | PowerModels]: removing 1 cost terms from generator 5: Any[1.0, 0.0]
[info | PowerModels]: removing 3 cost terms from generator 15: Any[]
[info | PowerModels]: removing 3 cost terms from generator 16: Any[]
[info | PowerModels]: removing 1 cost terms from generator 14: Any[1.0, 0.0]
[info | PowerModels]: removing 1 cost terms from generator 21: Any[1.0, 0.0]
[info | PowerModels]: removing 3 cost terms from generator 7: Any[]
[info | PowerModels]: removing 3 cost terms from generator 8: Any[]
[info | PowerModels]: removing 1 cost terms from generator 17: Any[1.0, 0.0]
[info | PowerModels]: removing 3 cost terms from generator 10: Any[]
[info | PowerModels]: removing 3 cost terms from generator 19: Any[]
[info | PowerModels]: removing 3 cost terms from generator 9: Any[]
[info | PowerModels]: removing 3 cost terms from generator 18: Any[]
[info | PowerModels]: removing 1 cost terms from generator 3: Any[1.0, 0.0]

******************************************************************************
This program contains Ipopt, a library for large-scale nonlinear optimization.
 Ipopt is released as open source code under the Eclipse Public License (EPL).
         For more information visit http://projects.coin-or.org/Ipopt
******************************************************************************

Welcome to the CBC MILP Solver 
Version: 2.10.3 
Build Date: Jan  1 1970 

command line - Cbc_C_Interface -seconds Inf -logLevel 1 -solve -quit (default strategy 1)
inf was provided for seconds - valid range is -1 to 1.79769e+308
Continuous objective value is 0 - 0.00 seconds
Cgl0003I 0 fixed, 0 tightened bounds, 12 strengthened rows, 0 substitutions
Cgl0004I processed model has 0 rows, 0 columns (0 integer (0 of which binary)) and 0 elements
Cbc3007W No integer variables - nothing to do
Cuts at root node changed objective from 0.781383 to -1.79769e+308
Probing was tried 0 times and created 0 cuts of which 0 were active after adding rounds of cuts (0.000 seconds)
Gomory was tried 0 times and created 0 cuts of which 0 were active after adding rounds of cuts (0.000 seconds)
Knapsack was tried 0 times and created 0 cuts of which 0 were active after adding rounds of cuts (0.000 seconds)
Clique was tried 0 times and created 0 cuts of which 0 were active after adding rounds of cuts (0.000 seconds)
MixedIntegerRounding2 was tried 0 times and created 0 cuts of which 0 were active after adding rounds of cuts (0.000 seconds)
FlowCover was tried 0 times and created 0 cuts of which 0 were active after adding rounds of cuts (0.000 seconds)
TwoMirCuts was tried 0 times and created 0 cuts of which 0 were active after adding rounds of cuts (0.000 seconds)
ZeroHalf was tried 0 times and created 0 cuts of which 0 were active after adding rounds of cuts (0.000 seconds)

Result - Optimal solution found

Objective value:                0.78138310
Enumerated nodes:               0
Total iterations:               1
Time (CPU seconds):             0.00
Time (Wallclock seconds):       0.01

Total time (CPU seconds):       0.00   (Wallclock seconds):       0.01

Welcome to the CBC MILP Solver 
Version: 2.10.3 
Build Date: Jan  1 1970 

command line - Cbc_C_Interface -seconds Inf -logLevel 1 -solve -quit (default strategy 1)
inf was provided for seconds - valid range is -1 to 1.79769e+308
Continuous objective value is 0.864979 - 0.00 seconds
Cgl0003I 59 fixed, 0 tightened bounds, 118 strengthened rows, 67 substitutions
Cgl0004I processed model has 60 rows, 118 columns (59 integer (59 of which binary)) and 177 elements
Cbc0012I Integer solution of 1.05797 found by DiveCoefficient after 0 iterations and 0 nodes (0.01 seconds)
Cbc0001I Search completed - best objective 1.057970005039626, took 0 iterations and 0 nodes (0.01 seconds)
Cbc0035I Maximum depth 0, 0 variables fixed on reduced cost
Cuts at root node changed objective from 1.05797 to 1.05797
Probing was tried 0 times and created 0 cuts of which 0 were active after adding rounds of cuts (0.000 seconds)
Gomory was tried 0 times and created 0 cuts of which 0 were active after adding rounds of cuts (0.000 seconds)
Knapsack was tried 0 times and created 0 cuts of which 0 were active after adding rounds of cuts (0.000 seconds)
Clique was tried 0 times and created 0 cuts of which 0 were active after adding rounds of cuts (0.000 seconds)
MixedIntegerRounding2 was tried 0 times and created 0 cuts of which 0 were active after adding rounds of cuts (0.000 seconds)
FlowCover was tried 0 times and created 0 cuts of which 0 were active after adding rounds of cuts (0.000 seconds)
TwoMirCuts was tried 0 times and created 0 cuts of which 0 were active after adding rounds of cuts (0.000 seconds)
ZeroHalf was tried 0 times and created 0 cuts of which 0 were active after adding rounds of cuts (0.000 seconds)

Result - Optimal solution found

Objective value:                1.05797001
Enumerated nodes:               0
Total iterations:               0
Time (CPU seconds):             0.01
Time (Wallclock seconds):       0.01

Total time (CPU seconds):       0.01   (Wallclock seconds):       0.01

[info | PowerModels]: removing 1 cost terms from generator 4: Any[1.0, 0.0]
[info | PowerModels]: removing 1 cost terms from generator 1: Any[1.0, 0.0]
[info | PowerModels]: removing 3 cost terms from generator 12: Any[]
[info | PowerModels]: removing 1 cost terms from generator 20: Any[1.0, 0.0]
[info | PowerModels]: removing 3 cost terms from generator 2: Any[]
[info | PowerModels]: removing 3 cost terms from generator 6: Any[]
[info | PowerModels]: removing 1 cost terms from generator 22: Any[1.0, 0.0]
[info | PowerModels]: removing 1 cost terms from generator 11: Any[1.0, 0.0]
[info | PowerModels]: removing 3 cost terms from generator 13: Any[]
[info | PowerModels]: removing 1 cost terms from generator 5: Any[1.0, 0.0]
[info | PowerModels]: removing 3 cost terms from generator 15: Any[]
[info | PowerModels]: removing 3 cost terms from generator 16: Any[]
[info | PowerModels]: removing 1 cost terms from generator 14: Any[1.0, 0.0]
[info | PowerModels]: removing 1 cost terms from generator 21: Any[1.0, 0.0]
[info | PowerModels]: removing 3 cost terms from generator 7: Any[]
[info | PowerModels]: removing 3 cost terms from generator 8: Any[]
[info | PowerModels]: removing 1 cost terms from generator 17: Any[1.0, 0.0]
[info | PowerModels]: removing 3 cost terms from generator 10: Any[]
[info | PowerModels]: removing 3 cost terms from generator 19: Any[]
[info | PowerModels]: removing 3 cost terms from generator 9: Any[]
[info | PowerModels]: removing 3 cost terms from generator 18: Any[]
[info | PowerModels]: removing 1 cost terms from generator 3: Any[1.0, 0.0]
Welcome to the CBC MILP Solver 
Version: 2.10.3 
Build Date: Jan  1 1970 

command line - Cbc_C_Interface -seconds Inf -logLevel 1 -solve -quit (default strategy 1)
inf was provided for seconds - valid range is -1 to 1.79769e+308
Continuous objective value is 0 - 0.00 seconds
Cgl0003I 0 fixed, 0 tightened bounds, 12 strengthened rows, 0 substitutions
Cgl0004I processed model has 0 rows, 0 columns (0 integer (0 of which binary)) and 0 elements
Cbc3007W No integer variables - nothing to do
Cuts at root node changed objective from 0.650343 to -1.79769e+308
Probing was tried 0 times and created 0 cuts of which 0 were active after adding rounds of cuts (0.000 seconds)
Gomory was tried 0 times and created 0 cuts of which 0 were active after adding rounds of cuts (0.000 seconds)
Knapsack was tried 0 times and created 0 cuts of which 0 were active after adding rounds of cuts (0.000 seconds)
Clique was tried 0 times and created 0 cuts of which 0 were active after adding rounds of cuts (0.000 seconds)
MixedIntegerRounding2 was tried 0 times and created 0 cuts of which 0 were active after adding rounds of cuts (0.000 seconds)
FlowCover was tried 0 times and created 0 cuts of which 0 were active after adding rounds of cuts (0.000 seconds)
TwoMirCuts was tried 0 times and created 0 cuts of which 0 were active after adding rounds of cuts (0.000 seconds)
ZeroHalf was tried 0 times and created 0 cuts of which 0 were active after adding rounds of cuts (0.000 seconds)

Result - Optimal solution found

Objective value:                0.65034330
Enumerated nodes:               0
Total iterations:               1
Time (CPU seconds):             0.00
Time (Wallclock seconds):       0.00

Total time (CPU seconds):       0.00   (Wallclock seconds):       0.00

[info | PowerModels]: removing 1 cost terms from generator 4: Any[1.0, 0.0]
[info | PowerModels]: removing 1 cost terms from generator 1: Any[1.0, 0.0]
[info | PowerModels]: removing 3 cost terms from generator 12: Any[]
[info | PowerModels]: removing 1 cost terms from generator 20: Any[1.0, 0.0]
[info | PowerModels]: removing 3 cost terms from generator 2: Any[]
[info | PowerModels]: removing 3 cost terms from generator 6: Any[]
[info | PowerModels]: removing 1 cost terms from generator 22: Any[1.0, 0.0]
[info | PowerModels]: removing 1 cost terms from generator 11: Any[1.0, 0.0]
[info | PowerModels]: removing 3 cost terms from generator 13: Any[]
[info | PowerModels]: removing 1 cost terms from generator 5: Any[1.0, 0.0]
[info | PowerModels]: removing 3 cost terms from generator 15: Any[]
[info | PowerModels]: removing 3 cost terms from generator 16: Any[]
[info | PowerModels]: removing 1 cost terms from generator 14: Any[1.0, 0.0]
[info | PowerModels]: removing 1 cost terms from generator 21: Any[1.0, 0.0]
[info | PowerModels]: removing 3 cost terms from generator 7: Any[]
[info | PowerModels]: removing 3 cost terms from generator 8: Any[]
[info | PowerModels]: removing 1 cost terms from generator 17: Any[1.0, 0.0]
[info | PowerModels]: removing 3 cost terms from generator 10: Any[]
[info | PowerModels]: removing 3 cost terms from generator 19: Any[]
[info | PowerModels]: removing 3 cost terms from generator 9: Any[]
[info | PowerModels]: removing 3 cost terms from generator 18: Any[]
[info | PowerModels]: removing 1 cost terms from generator 3: Any[1.0, 0.0]
Welcome to the CBC MILP Solver 
Version: 2.10.3 
Build Date: Jan  1 1970 

command line - Cbc_C_Interface -seconds Inf -logLevel 1 -solve -quit (default strategy 1)
inf was provided for seconds - valid range is -1 to 1.79769e+308
Continuous objective value is 0 - 0.00 seconds
Cgl0003I 0 fixed, 0 tightened bounds, 13 strengthened rows, 0 substitutions
Cgl0004I processed model has 0 rows, 0 columns (0 integer (0 of which binary)) and 0 elements
Cbc3007W No integer variables - nothing to do
Cuts at root node changed objective from 0.578635 to -1.79769e+308
Probing was tried 0 times and created 0 cuts of which 0 were active after adding rounds of cuts (0.000 seconds)
Gomory was tried 0 times and created 0 cuts of which 0 were active after adding rounds of cuts (0.000 seconds)
Knapsack was tried 0 times and created 0 cuts of which 0 were active after adding rounds of cuts (0.000 seconds)
Clique was tried 0 times and created 0 cuts of which 0 were active after adding rounds of cuts (0.000 seconds)
MixedIntegerRounding2 was tried 0 times and created 0 cuts of which 0 were active after adding rounds of cuts (0.000 seconds)
FlowCover was tried 0 times and created 0 cuts of which 0 were active after adding rounds of cuts (0.000 seconds)
TwoMirCuts was tried 0 times and created 0 cuts of which 0 were active after adding rounds of cuts (0.000 seconds)
ZeroHalf was tried 0 times and created 0 cuts of which 0 were active after adding rounds of cuts (0.000 seconds)

Result - Optimal solution found

Objective value:                0.57863491
Enumerated nodes:               0
Total iterations:               1
Time (CPU seconds):             0.01
Time (Wallclock seconds):       0.01

Total time (CPU seconds):       0.01   (Wallclock seconds):       0.01

Welcome to the CBC MILP Solver 
Version: 2.10.3 
Build Date: Jan  1 1970 

command line - Cbc_C_Interface -seconds Inf -logLevel 1 -solve -quit (default strategy 1)
inf was provided for seconds - valid range is -1 to 1.79769e+308
Continuous objective value is 0.82776 - 0.00 seconds
Cgl0003I 58 fixed, 0 tightened bounds, 116 strengthened rows, 129 substitutions
Cgl0003I 0 fixed, 0 tightened bounds, 0 strengthened rows, 78 substitutions
Cgl0004I processed model has 59 rows, 116 columns (58 integer (58 of which binary)) and 174 elements
Cbc0012I Integer solution of 1.0129147 found by DiveCoefficient after 0 iterations and 0 nodes (0.01 seconds)
Cbc0001I Search completed - best objective 1.012914744722301, took 0 iterations and 0 nodes (0.01 seconds)
Cbc0035I Maximum depth 0, 0 variables fixed on reduced cost
Cuts at root node changed objective from 1.01291 to 1.01291
Probing was tried 0 times and created 0 cuts of which 0 were active after adding rounds of cuts (0.000 seconds)
Gomory was tried 0 times and created 0 cuts of which 0 were active after adding rounds of cuts (0.000 seconds)
Knapsack was tried 0 times and created 0 cuts of which 0 were active after adding rounds of cuts (0.000 seconds)
Clique was tried 0 times and created 0 cuts of which 0 were active after adding rounds of cuts (0.000 seconds)
MixedIntegerRounding2 was tried 0 times and created 0 cuts of which 0 were active after adding rounds of cuts (0.000 seconds)
FlowCover was tried 0 times and created 0 cuts of which 0 were active after adding rounds of cuts (0.000 seconds)
TwoMirCuts was tried 0 times and created 0 cuts of which 0 were active after adding rounds of cuts (0.000 seconds)
ZeroHalf was tried 0 times and created 0 cuts of which 0 were active after adding rounds of cuts (0.000 seconds)

Result - Optimal solution found

Objective value:                1.01291474
Enumerated nodes:               0
Total iterations:               0
Time (CPU seconds):             0.01
Time (Wallclock seconds):       0.01

Total time (CPU seconds):       0.01   (Wallclock seconds):       0.01

[info | PowerModels]: removing 1 cost terms from generator 4: Any[1.0, 0.0]
[info | PowerModels]: removing 1 cost terms from generator 1: Any[1.0, 0.0]
[info | PowerModels]: removing 3 cost terms from generator 12: Any[]
[info | PowerModels]: removing 1 cost terms from generator 20: Any[1.0, 0.0]
[info | PowerModels]: removing 3 cost terms from generator 2: Any[]
[info | PowerModels]: removing 3 cost terms from generator 6: Any[]
[info | PowerModels]: removing 1 cost terms from generator 22: Any[1.0, 0.0]
[info | PowerModels]: removing 1 cost terms from generator 11: Any[1.0, 0.0]
[info | PowerModels]: removing 3 cost terms from generator 13: Any[]
[info | PowerModels]: removing 1 cost terms from generator 5: Any[1.0, 0.0]
[info | PowerModels]: removing 3 cost terms from generator 15: Any[]
[info | PowerModels]: removing 3 cost terms from generator 16: Any[]
[info | PowerModels]: removing 1 cost terms from generator 14: Any[1.0, 0.0]
[info | PowerModels]: removing 1 cost terms from generator 21: Any[1.0, 0.0]
[info | PowerModels]: removing 3 cost terms from generator 7: Any[]
[info | PowerModels]: removing 3 cost terms from generator 8: Any[]
[info | PowerModels]: removing 1 cost terms from generator 17: Any[1.0, 0.0]
[info | PowerModels]: removing 3 cost terms from generator 10: Any[]
[info | PowerModels]: removing 3 cost terms from generator 19: Any[]
[info | PowerModels]: removing 3 cost terms from generator 9: Any[]
[info | PowerModels]: removing 3 cost terms from generator 18: Any[]
[info | PowerModels]: removing 1 cost terms from generator 3: Any[1.0, 0.0]
Welcome to the CBC MILP Solver 
Version: 2.10.3 
Build Date: Jan  1 1970 

command line - Cbc_C_Interface -seconds Inf -logLevel 1 -solve -quit (default strategy 1)
inf was provided for seconds - valid range is -1 to 1.79769e+308
Continuous objective value is 0 - 0.00 seconds
Cgl0003I 0 fixed, 0 tightened bounds, 15 strengthened rows, 0 substitutions
Cgl0004I processed model has 0 rows, 0 columns (0 integer (0 of which binary)) and 0 elements
Cbc3007W No integer variables - nothing to do
Cuts at root node changed objective from 0.578009 to -1.79769e+308
Probing was tried 0 times and created 0 cuts of which 0 were active after adding rounds of cuts (0.000 seconds)
Gomory was tried 0 times and created 0 cuts of which 0 were active after adding rounds of cuts (0.000 seconds)
Knapsack was tried 0 times and created 0 cuts of which 0 were active after adding rounds of cuts (0.000 seconds)
Clique was tried 0 times and created 0 cuts of which 0 were active after adding rounds of cuts (0.000 seconds)
MixedIntegerRounding2 was tried 0 times and created 0 cuts of which 0 were active after adding rounds of cuts (0.000 seconds)
FlowCover was tried 0 times and created 0 cuts of which 0 were active after adding rounds of cuts (0.000 seconds)
TwoMirCuts was tried 0 times and created 0 cuts of which 0 were active after adding rounds of cuts (0.000 seconds)
ZeroHalf was tried 0 times and created 0 cuts of which 0 were active after adding rounds of cuts (0.000 seconds)

Result - Optimal solution found

Objective value:                0.57800888
Enumerated nodes:               0
Total iterations:               0
Time (CPU seconds):             0.00
Time (Wallclock seconds):       0.00

Total time (CPU seconds):       0.01   (Wallclock seconds):       0.01

Welcome to the CBC MILP Solver 
Version: 2.10.3 
Build Date: Jan  1 1970 

command line - Cbc_C_Interface -seconds Inf -logLevel 1 -solve -quit (default strategy 1)
inf was provided for seconds - valid range is -1 to 1.79769e+308
Continuous objective value is 0.830127 - 0.00 seconds
Cgl0003I 57 fixed, 0 tightened bounds, 114 strengthened rows, 69 substitutions
Cgl0003I 0 fixed, 0 tightened bounds, 0 strengthened rows, 6 substitutions
Cgl0004I processed model has 58 rows, 114 columns (57 integer (57 of which binary)) and 171 elements
Cbc0012I Integer solution of 1.0176607 found by DiveCoefficient after 0 iterations and 0 nodes (0.01 seconds)
Cbc0001I Search completed - best objective 1.017660693772243, took 0 iterations and 0 nodes (0.01 seconds)
Cbc0035I Maximum depth 0, 0 variables fixed on reduced cost
Cuts at root node changed objective from 1.01766 to 1.01766
Probing was tried 0 times and created 0 cuts of which 0 were active after adding rounds of cuts (0.000 seconds)
Gomory was tried 0 times and created 0 cuts of which 0 were active after adding rounds of cuts (0.000 seconds)
Knapsack was tried 0 times and created 0 cuts of which 0 were active after adding rounds of cuts (0.000 seconds)
Clique was tried 0 times and created 0 cuts of which 0 were active after adding rounds of cuts (0.000 seconds)
MixedIntegerRounding2 was tried 0 times and created 0 cuts of which 0 were active after adding rounds of cuts (0.000 seconds)
FlowCover was tried 0 times and created 0 cuts of which 0 were active after adding rounds of cuts (0.000 seconds)
TwoMirCuts was tried 0 times and created 0 cuts of which 0 were active after adding rounds of cuts (0.000 seconds)
ZeroHalf was tried 0 times and created 0 cuts of which 0 were active after adding rounds of cuts (0.000 seconds)

Result - Optimal solution found

Objective value:                1.01766069
Enumerated nodes:               0
Total iterations:               0
Time (CPU seconds):             0.01
Time (Wallclock seconds):       0.01

Total time (CPU seconds):       0.01   (Wallclock seconds):       0.01

[info | PowerModels]: removing 1 cost terms from generator 4: Any[1.0, 0.0]
[info | PowerModels]: removing 1 cost terms from generator 1: Any[1.0, 0.0]
[info | PowerModels]: removing 3 cost terms from generator 12: Any[]
[info | PowerModels]: removing 1 cost terms from generator 20: Any[1.0, 0.0]
[info | PowerModels]: removing 3 cost terms from generator 2: Any[]
[info | PowerModels]: removing 3 cost terms from generator 6: Any[]
[info | PowerModels]: removing 1 cost terms from generator 22: Any[1.0, 0.0]
[info | PowerModels]: removing 1 cost terms from generator 11: Any[1.0, 0.0]
[info | PowerModels]: removing 3 cost terms from generator 13: Any[]
[info | PowerModels]: removing 1 cost terms from generator 5: Any[1.0, 0.0]
[info | PowerModels]: removing 3 cost terms from generator 15: Any[]
[info | PowerModels]: removing 3 cost terms from generator 16: Any[]
[info | PowerModels]: removing 1 cost terms from generator 14: Any[1.0, 0.0]
[info | PowerModels]: removing 1 cost terms from generator 21: Any[1.0, 0.0]
[info | PowerModels]: removing 3 cost terms from generator 7: Any[]
[info | PowerModels]: removing 3 cost terms from generator 8: Any[]
[info | PowerModels]: removing 1 cost terms from generator 17: Any[1.0, 0.0]
[info | PowerModels]: removing 3 cost terms from generator 10: Any[]
[info | PowerModels]: removing 3 cost terms from generator 19: Any[]
[info | PowerModels]: removing 3 cost terms from generator 9: Any[]
[info | PowerModels]: removing 3 cost terms from generator 18: Any[]
[info | PowerModels]: removing 1 cost terms from generator 3: Any[1.0, 0.0]
Welcome to the CBC MILP Solver 
Version: 2.10.3 
Build Date: Jan  1 1970 

command line - Cbc_C_Interface -seconds Inf -logLevel 1 -solve -quit (default strategy 1)
inf was provided for seconds - valid range is -1 to 1.79769e+308
Continuous objective value is 0 - 0.00 seconds
Cgl0003I 0 fixed, 0 tightened bounds, 13 strengthened rows, 0 substitutions
Cgl0004I processed model has 0 rows, 0 columns (0 integer (0 of which binary)) and 0 elements
Cbc3007W No integer variables - nothing to do
Cuts at root node changed objective from 0.57549 to -1.79769e+308
Probing was tried 0 times and created 0 cuts of which 0 were active after adding rounds of cuts (0.000 seconds)
Gomory was tried 0 times and created 0 cuts of which 0 were active after adding rounds of cuts (0.000 seconds)
Knapsack was tried 0 times and created 0 cuts of which 0 were active after adding rounds of cuts (0.000 seconds)
Clique was tried 0 times and created 0 cuts of which 0 were active after adding rounds of cuts (0.000 seconds)
MixedIntegerRounding2 was tried 0 times and created 0 cuts of which 0 were active after adding rounds of cuts (0.000 seconds)
FlowCover was tried 0 times and created 0 cuts of which 0 were active after adding rounds of cuts (0.000 seconds)
TwoMirCuts was tried 0 times and created 0 cuts of which 0 were active after adding rounds of cuts (0.000 seconds)
ZeroHalf was tried 0 times and created 0 cuts of which 0 were active after adding rounds of cuts (0.000 seconds)

Result - Optimal solution found

Objective value:                0.57549003
Enumerated nodes:               0
Total iterations:               0
Time (CPU seconds):             0.00
Time (Wallclock seconds):       0.00

Total time (CPU seconds):       0.00   (Wallclock seconds):       0.00

[info | PowerModels]: removing 1 cost terms from generator 4: Any[1.0, 0.0]
[info | PowerModels]: removing 1 cost terms from generator 1: Any[1.0, 0.0]
[info | PowerModels]: removing 3 cost terms from generator 12: Any[]
[info | PowerModels]: removing 1 cost terms from generator 20: Any[1.0, 0.0]
[info | PowerModels]: removing 3 cost terms from generator 2: Any[]
[info | PowerModels]: removing 3 cost terms from generator 6: Any[]
[info | PowerModels]: removing 1 cost terms from generator 22: Any[1.0, 0.0]
[info | PowerModels]: removing 1 cost terms from generator 11: Any[1.0, 0.0]
[info | PowerModels]: removing 3 cost terms from generator 13: Any[]
[info | PowerModels]: removing 1 cost terms from generator 5: Any[1.0, 0.0]
[info | PowerModels]: removing 3 cost terms from generator 15: Any[]
[info | PowerModels]: removing 3 cost terms from generator 16: Any[]
[info | PowerModels]: removing 1 cost terms from generator 14: Any[1.0, 0.0]
[info | PowerModels]: removing 1 cost terms from generator 21: Any[1.0, 0.0]
[info | PowerModels]: removing 3 cost terms from generator 7: Any[]
[info | PowerModels]: removing 3 cost terms from generator 8: Any[]
[info | PowerModels]: removing 1 cost terms from generator 17: Any[1.0, 0.0]
[info | PowerModels]: removing 3 cost terms from generator 10: Any[]
[info | PowerModels]: removing 3 cost terms from generator 19: Any[]
[info | PowerModels]: removing 3 cost terms from generator 9: Any[]
[info | PowerModels]: removing 3 cost terms from generator 18: Any[]
[info | PowerModels]: removing 1 cost terms from generator 3: Any[1.0, 0.0]
Welcome to the CBC MILP Solver 
Version: 2.10.3 
Build Date: Jan  1 1970 

command line - Cbc_C_Interface -seconds Inf -logLevel 1 -solve -quit (default strategy 1)
inf was provided for seconds - valid range is -1 to 1.79769e+308
Continuous objective value is 0 - 0.00 seconds
Cgl0003I 0 fixed, 0 tightened bounds, 14 strengthened rows, 0 substitutions
Cgl0004I processed model has 0 rows, 0 columns (0 integer (0 of which binary)) and 0 elements
Cbc3007W No integer variables - nothing to do
Cuts at root node changed objective from 0.653631 to -1.79769e+308
Probing was tried 0 times and created 0 cuts of which 0 were active after adding rounds of cuts (0.000 seconds)
Gomory was tried 0 times and created 0 cuts of which 0 were active after adding rounds of cuts (0.000 seconds)
Knapsack was tried 0 times and created 0 cuts of which 0 were active after adding rounds of cuts (0.000 seconds)
Clique was tried 0 times and created 0 cuts of which 0 were active after adding rounds of cuts (0.000 seconds)
MixedIntegerRounding2 was tried 0 times and created 0 cuts of which 0 were active after adding rounds of cuts (0.000 seconds)
FlowCover was tried 0 times and created 0 cuts of which 0 were active after adding rounds of cuts (0.000 seconds)
TwoMirCuts was tried 0 times and created 0 cuts of which 0 were active after adding rounds of cuts (0.000 seconds)
ZeroHalf was tried 0 times and created 0 cuts of which 0 were active after adding rounds of cuts (0.000 seconds)

Result - Optimal solution found

Objective value:                0.65363144
Enumerated nodes:               0
Total iterations:               0
Time (CPU seconds):             0.00
Time (Wallclock seconds):       0.00

Total time (CPU seconds):       0.01   (Wallclock seconds):       0.01

[info | PowerModels]: removing 1 cost terms from generator 4: Any[1.0, 0.0]
[info | PowerModels]: removing 1 cost terms from generator 1: Any[1.0, 0.0]
[info | PowerModels]: removing 3 cost terms from generator 12: Any[]
[info | PowerModels]: removing 1 cost terms from generator 20: Any[1.0, 0.0]
[info | PowerModels]: removing 3 cost terms from generator 2: Any[]
[info | PowerModels]: removing 3 cost terms from generator 6: Any[]
[info | PowerModels]: removing 1 cost terms from generator 22: Any[1.0, 0.0]
[info | PowerModels]: removing 1 cost terms from generator 11: Any[1.0, 0.0]
[info | PowerModels]: removing 3 cost terms from generator 13: Any[]
[info | PowerModels]: removing 1 cost terms from generator 5: Any[1.0, 0.0]
[info | PowerModels]: removing 3 cost terms from generator 15: Any[]
[info | PowerModels]: removing 3 cost terms from generator 16: Any[]
[info | PowerModels]: removing 1 cost terms from generator 14: Any[1.0, 0.0]
[info | PowerModels]: removing 1 cost terms from generator 21: Any[1.0, 0.0]
[info | PowerModels]: removing 3 cost terms from generator 7: Any[]
[info | PowerModels]: removing 3 cost terms from generator 8: Any[]
[info | PowerModels]: removing 1 cost terms from generator 17: Any[1.0, 0.0]
[info | PowerModels]: removing 3 cost terms from generator 10: Any[]
[info | PowerModels]: removing 3 cost terms from generator 19: Any[]
[info | PowerModels]: removing 3 cost terms from generator 9: Any[]
[info | PowerModels]: removing 3 cost terms from generator 18: Any[]
[info | PowerModels]: removing 1 cost terms from generator 3: Any[1.0, 0.0]
[warn | InfrastructureModels]: model has no results, solution cannot be built
ERROR: ingestion program failed with error: 
'bus'

------------------------------------
        Detailed error Logs         
------------------------------------
Traceback (most recent call last):
  File "/home/alwin/PycharmProjects/l2rpn-challenge/submission/utils/ingestion_program_local//ingestion.py", line 306, in <module>
    main()
  File "/home/alwin/PycharmProjects/l2rpn-challenge/submission/utils/ingestion_program_local//ingestion.py", line 282, in main
    agent_seeds=agent_seeds,
  File "/home/alwin/miniconda3/envs/l2rpn_challenge/lib/python3.7/site-packages/grid2op/Runner/Runner.py", line 1076, in run
    env_seeds=env_seeds, max_iter=max_iter, agent_seeds=agent_seeds)
  File "/home/alwin/miniconda3/envs/l2rpn_challenge/lib/python3.7/site-packages/grid2op/Runner/Runner.py", line 819, in _run_sequential
    max_iter=max_iter)
  File "/home/alwin/miniconda3/envs/l2rpn_challenge/lib/python3.7/site-packages/grid2op/Runner/Runner.py", line 592, in run_one_episode
    pbar=pbar, env_seed=env_seed, max_iter=max_iter, agent_seed=agent_seed)
  File "/home/alwin/miniconda3/envs/l2rpn_challenge/lib/python3.7/site-packages/grid2op/Runner/Runner.py", line 694, in _run_one_episode
    act = agent.act(obs, reward, done)
  File "/home/alwin/miniconda3/envs/l2rpn_challenge/lib/python3.7/site-packages/l2rpn_baselines/PandapowerOPFAgent/PandapowerOPFAgent.py", line 175, in act
    self.opf_type.lower(), logger=self.logger)
  File "/home/alwin/miniconda3/envs/l2rpn_challenge/lib/python3.7/site-packages/l2rpn_baselines/PandapowerOPFAgent/pp_functions.py", line 55, in run_opf
    pp.runpm_ots(grid, pm_nl_solver="ipopt", pm_model="ACPPowerModel", pm_log_level=1)  # PowerModels.jl OPF
  File "/home/alwin/miniconda3/envs/l2rpn_challenge/lib/python3.7/site-packages/pandapower/runpm.py", line 320, in runpm_ots
    _runpm(net)
  File "/home/alwin/miniconda3/envs/l2rpn_challenge/lib/python3.7/site-packages/pandapower/opf/run_powermodels.py", line 38, in _runpm
    read_pm_results_to_net(net, ppc, ppci, result_pm)
  File "/home/alwin/miniconda3/envs/l2rpn_challenge/lib/python3.7/site-packages/pandapower/converter/powermodels/from_pm.py", line 18, in read_pm_results_to_net
    result, multinetwork = pm_results_to_ppc_results(net, ppc, ppci, result_pm)
  File "/home/alwin/miniconda3/envs/l2rpn_challenge/lib/python3.7/site-packages/pandapower/converter/powermodels/from_pm.py", line 51, in pm_results_to_ppc_results
    for i, bus in sol["bus"].items():
KeyError: 'bus'
------------------------------------
      End Detailed error Logs       
------------------------------------

```

</details>
Thank you for the report. The solver does, indeed, not converge. I can add an exception as a fix and check if "bus" is in sol, otherwise "OPF not converged" will be raised. 

Resolving patch:
diff --git a/pandapower/converter/powermodels/from_pm.py b/pandapower/converter/powermodels/from_pm.py
--- a/pandapower/converter/powermodels/from_pm.py
+++ b/pandapower/converter/powermodels/from_pm.py
@@ -8,7 +8,7 @@
 from pandapower.pypower.idx_bus import VA, VM
 from pandapower.pypower.idx_gen import PG, QG
 from pandapower.results import _extract_results, _copy_results_ppci_to_ppc
-
+from pandapower.optimal_powerflow import OPFNotConverged
 
 def read_pm_results_to_net(net, ppc, ppci, result_pm):
     """
@@ -27,6 +27,7 @@ def read_pm_results_to_net(net, ppc, ppci, result_pm):
     else:
         _clean_up(net, res=False)
         logger.warning("OPF did not converge!")
+        raise OPFNotConverged("PowerModels.jl OPF not converged")
 
 
 def pm_results_to_ppc_results(net, ppc, ppci, result_pm):
@@ -48,36 +49,40 @@ def pm_results_to_ppc_results(net, ppc, ppci, result_pm):
         ppc["f"] = ppci["f"]
         return ppc, multinetwork
 
-    for i, bus in sol["bus"].items():
-        bus_idx = int(i) - 1
-        if "vm" in bus:
-            ppci["bus"][bus_idx, VM] = bus["vm"]
-        if "va" in bus:
-            # replace nans with 0.(in case of SOCWR model for example
-            ppci["bus"][bus_idx, VA] = 0.0 if bus["va"] == None else math.degrees(bus["va"])
-        if "w" in bus:
-            # SOCWR model has only w instead of vm values
-            ppci["bus"][bus_idx, VM] = bus["w"]
-
-    for i, gen in sol["gen"].items():
-        gen_idx = int(i) - 1
-        ppci["gen"][gen_idx, PG] = gen["pg"]
-        ppci["gen"][gen_idx, QG] = gen["qg"]
-
-    # read Q from branch results (if not DC calculation)
-    if "branch" in sol:
-        dc_results = sol["branch"]["1"]["qf"] is None or np.isnan(sol["branch"]["1"]["qf"])
-        # read branch status results (OTS)
-        branch_status = "br_status" in sol["branch"]["1"]
-        for i, branch in sol["branch"].items():
-            br_idx = int(i) - 1
-            ppci["branch"][br_idx, PF] = branch["pf"]
-            ppci["branch"][br_idx, PT] = branch["pt"]
-            if not dc_results:
-                ppci["branch"][br_idx, QF] = branch["qf"]
-                ppci["branch"][br_idx, QT] = branch["qt"]
-            if branch_status:
-                ppci["branch"][br_idx, BR_STATUS] = branch["br_status"] > 0.5
+    if "bus" not in sol:
+        # PowerModels failed
+        ppci["success"] = False
+    else:
+        for i, bus in sol["bus"].items():
+            bus_idx = int(i) - 1
+            if "vm" in bus:
+                ppci["bus"][bus_idx, VM] = bus["vm"]
+            if "va" in bus:
+                # replace nans with 0.(in case of SOCWR model for example
+                ppci["bus"][bus_idx, VA] = 0.0 if bus["va"] == None else math.degrees(bus["va"])
+            if "w" in bus:
+                # SOCWR model has only w instead of vm values
+                ppci["bus"][bus_idx, VM] = bus["w"]
+
+        for i, gen in sol["gen"].items():
+            gen_idx = int(i) - 1
+            ppci["gen"][gen_idx, PG] = gen["pg"]
+            ppci["gen"][gen_idx, QG] = gen["qg"]
+
+        # read Q from branch results (if not DC calculation)
+        if "branch" in sol:
+            dc_results = sol["branch"]["1"]["qf"] is None or np.isnan(sol["branch"]["1"]["qf"])
+            # read branch status results (OTS)
+            branch_status = "br_status" in sol["branch"]["1"]
+            for i, branch in sol["branch"].items():
+                br_idx = int(i) - 1
+                ppci["branch"][br_idx, PF] = branch["pf"]
+                ppci["branch"][br_idx, PT] = branch["pt"]
+                if not dc_results:
+                    ppci["branch"][br_idx, QF] = branch["qf"]
+                    ppci["branch"][br_idx, QT] = branch["qt"]
+                if branch_status:
+                    ppci["branch"][br_idx, BR_STATUS] = branch["br_status"] > 0.5
 
     result = _copy_results_ppci_to_ppc(ppci, ppc, options["mode"])
     return result, multinetwork


Test patch: