NREL / gdx-pandas

Python interface to read and write GAMS GDX files using pandas.DataFrames as the intermediate data format.
BSD 3-Clause "New" or "Revised" License
43 stars 15 forks source link

'gdx2py' has no attribute 'par2list' #66

Closed jebob closed 4 years ago

jebob commented 5 years ago

When I tried installing gdx2py from https://github.com/ererkka/GDX2py, I then got the follow error when trying to load a dataframe

Traceback (most recent call last):
<My code>
  File "C:/Projects/jebob/runner.py", line 144, in input_loading
    in_dfs = gdxpds.to_dataframes(source)
  File "C:\Python36\lib\site-packages\gdxpds\read_gdx.py", line 116, in to_dataframes
    dfs = Translator(gdx_file,gams_dir=gams_dir).dataframes
  File "C:\Python36\lib\site-packages\gdxpds\read_gdx.py", line 51, in __init__
    self.__gdx.read(gdx_file)
  File "C:\Python36\lib\site-packages\gdxpds\gdx.py", line 430, in read
    symbol.load()
  File "C:\Python36\lib\site-packages\gdxpds\gdx.py", line 971, in load
    self.dataframe = gdx2py.par2list(self.file.filename,self.name) 
AttributeError: module 'gdx2py' has no attribute 'par2list'
elainethale commented 4 years ago

This is not the same gdx2py. The one I am referencing is a Windows dll provided by GAMS, not a Python library.

gabriel-abrahao commented 3 years ago

Hi, did this commit end up in a pull request? That part of the code is still on NREL/master

jebob commented 3 years ago

In order to use gdxpds, you must not have gdx2py (from ererkka) installed. You may have gdx2py (from GAMS corportation) installed.