ames-market / psst

PSST - Power System Simulation Toolbox
Other
39 stars 27 forks source link

to_dict() error in build_model() function #3

Open hm-shen opened 5 years ago

hm-shen commented 5 years ago

Environment Operation System: Ubuntu 16.04 x86_64 Python Version: Python 3.6.6 PSST Version: 0.1.3

Description I would like to run a demo jupyter notebook Validation 06 - Single Snapshot Unit Commitment and get the following error message while building a model:

screen shot 2018-12-23 at 2 12 54 am
kdheepak commented 5 years ago

Can you tell me how you installed it?

kdheepak commented 5 years ago

Thanks for posting the issue btw. I'm not going to have access to a work computer until some days from now. And I apologize for the terse replies as well, I'm largely on a mobile connection and I'll be able to get back to you in more detail later. I think I've seen this issue before, and I thought I fixed it as well. Let me know how you installed it and we cam go from there.

hm-shen commented 5 years ago

I cloned the repo and installed it using command pip install -e ..

It seems that generator_df["PMAX"] returns a Pandas.Series object whose to_dict method does not have orient as an argument.

(https://pandas.pydata.org/pandas-docs/stable/generated/pandas.Series.to_dict.html?highlight=to_dict#pandas.Series.to_dict)

It seems that removing the orient="list" part in the parentheses solves the problem.

kdheepak commented 5 years ago

Okay thanks for the information. It's possible that pandas has updated their API and I haven't. And I haven't pinned a version here unfortunately. I'll check out this issue when I'm back to a work computer.