Open murilo-ma opened 6 years ago
This is because in the following lines
r = runpf(ppc, ppopt)
printpf(r)
printpf is implemented as if r would be a dictionary with the different entries, but actually "r" is a tuple with one element that is this dictionary. Hence, the error is solved by doing
printpf(r[0])
instead. So I am not sure which is the best way to correct the code.
BTW, the error can be reproduced with the internal data in this way:
from pypower.api import ppoption, runpf, printpf, case9
ppc = case9()
ppopt = ppoption(PF_ALG=2)
r = runpf(ppc, ppopt)
printpf(r)
Python files used when the traceback occurred are attached as .txt files. params_banshee_f1.txt run_banshee_f1.txt
Traceback (most recent call last): File "C:/Users/[...]/POWER FLOW/run_banshee_f1.py", line 26, in
printpf(r)
File "C:\Python36\lib\site-packages\pypower\printpf.py", line 128, in printpf
i2e = bus[:, BUS_I].astype(int)
TypeError: 'NoneType' object is not subscriptable