Skip to content
Markus Reinert edited this page Oct 11, 2023 · 2 revisions

Welcome to the ExtremeSurgeAnalysis wiki!

Troubleshooting

OSError when determining the start year with gmtime

On Windows computers, a problem caused by the conversion of time formats has been reported. In the load_data function of tools_surge.py, it can occur that determining data["year_start"] and data["year_end"] fails with OSError: [Errno 22] Invalid argument. This problem seems to be caused by specific implementations of the gmtime function in the time module. It has only been reported on Windows so far, but not on Linux. Solutions to this error message can be found on Stack Overflow, but have not yet been tested for this repository.

However, there is a simple workaround:

The two lines causing the error can be commented out and instead, data["year_start"] and data["year_end"] can be set manually after load_data. Often, the user will know which date range is covered by the time series or can easily find out about it by looking at the data. Alternatively, it should work to use start and end years that are certainly outside the data range, for example 1000 and 3000.

Clone this wiki locally