Closed mzrghorbani closed 1 year ago
Actually, this sounds more like a Flee issue, so I'll move it there.
@mzrghorbani I am actually not able to reproduce this error. I did the following:
`fabsim localhost pflee:mali2012,simulation_period=10,cores=2
fabsim localhost fetch_results
fabsim localhost plot_output:mali2012_localhost_2
All this gave expected behavior without a KeyError. I also checked the FabFlee and Flee repo, but could not find the 'fix' you've implemented and described in your issue?
Could you perhaps give me more specific information as to what circumstances triggered this KeyError?
No response for over a month, so I assume this one got fixed. If not, please reopen it :).
Describe the bug
The _plotoutput plugin encounters a KeyError when producing plots. The specific key causing the error is 'Date sim'. This issue prevents the plugin from generating the expected output and saving plots in the desired png format.
Steps to Reproduce:
fabsim localhost plot_output:output
after fetching the processed data.Expected Behavior:
The _plotoutput plugin should successfully generate the desired plots without encountering a KeyError.
Proposed Solution:
To address the KeyError, a temporary solution has been implemented in the code by modifying the loop to start from the second element of the list. While this temporarily resolves the issue, it is important to investigate the root cause of why 'Date sim' is stored in the CSV file headers. Identifying the inconsistency in CSV file generation will help in achieving a more robust and consistent solution.
Additional Information:
Please let me know if any further information or clarification is needed.