Error in writecapdata.py - ValueError: Length mismatch: Expected axis has 7 elements, new values have 4 elements #112
Unanswered
etumibay
asked this question in
Q&A: Execution
Replies: 1 comment 2 replies
-
Have you verified that you have a recent version of Pandas and Python? You can use 'pip show pandas' on a command line to display the pandas version and just type 'python' from the command line to show the Python version. If you don't have at least version 1.1.5 of Pandas and 3.7.4 of Python, then I recommend updating then and trying again. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi! Unfortunately, I ran into some issues with my laptop, so I had to re-install ReEDS on another one. I am trying to run the model, and I believe I set everything up correctly. I can't get past a_writedata.gms, and the current error I am running into is seen here: gamslog.txt
--- . a_writedata.gms(45) 2 Mb
--- call python C:\Users\etumi\Documents\GitHub\ReEDS_OpenAccess\input_processing\writecapdat.py C:\Users\etumi\Documents\GitHub\ReEDS_OpenAccess\ ExistingUnits_EIA-NEMS.gdx PrescriptiveBuilds_EIA-NEMS.gdx PrescriptiveRetirements_EIA-NEMS.gdx Nuke80Retir
C:\Users\etumi\Documents\GitHub\ReEDS_OpenAccess\input_processing\writecapdat.py:182: FutureWarning: In a future version of pandas all arguments of DataFrame.drop except for the argument 'labels' will be keyword-only.
csp = csp.drop('wst',1)
Beginning calculation of inputs\capacitydata\writecapdat.py
Traceback (most recent call last):
File "C:\Users\etumi\Documents\GitHub\ReEDS_OpenAccess\input_processing\writecapdat.py", line 352, in
pnonrsc.columns = ['t','r','i','value']
File "C:\Users\etumi\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\pandas\core\generic.py", line 5588, in setattr
return object.setattr(self, name, value)
File "pandas_libs\properties.pyx", line 70, in pandas._libs.properties.AxisProperty.set
File "C:\Users\etumi\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\pandas\core\generic.py", line 769, in _set_axis
self._mgr.set_axis(axis, labels)
File "C:\Users\etumi\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\pandas\core\internals\managers.py", line 214, in set_axis
self._validate_set_axis(axis, new_labels)
File "C:\Users\etumi\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\pandas\core\internals\base.py", line 69, in _validate_set_axis
raise ValueError(
ValueError: Length mismatch: Expected axis has 7 elements, new values have 4 elements
*** $call.checkErrorLevel returned with 1
*** Error 343 in C:\Users\etumi\Documents\GitHub\ReEDS_OpenAccess\runs\pls_ercot_small\a_writedata.gms
Abort triggered by above statement
--- createmodel.gms(1) 2 Mb 1 Error
*** Status: Compilation error(s)
--- Job createmodel.gms Stop 04/03/22 12:47:20 elapsed 0:00:02.974
Please let me know how to fix this. Thank you!
Beta Was this translation helpful? Give feedback.
All reactions