-
Notifications
You must be signed in to change notification settings - Fork 182
Description
When I'm running the examples using VS Code through Anaconda Navigator on my Windows computer, it automatically makes floris (i.e., the base folder) the running directory, instead of the folder in which the example is located (i.e., floris/examples). As a result, when the examples (e.g., 003_wind_data_objects.py or 006_get_farm_aep) try to load the inputs/wind_rose.csv file, it can't be found because it's looking in a non-existing directory.
This issue can easily be solved by the user adding examples to the path when loading the wind rose, but we probably want users on Windows to also be able to run the examples without having to change anything in the code. It also seems that someone at some point was aware of this issue, as I have noticed that FlorisModel does load the yaml files correctly due to this little try-except added to floris_model.py:
Perhaps we'll want to add a similar code snippet to other functions that load data from files, such as WindRose.read_csv_long() used to load wind_rose.csv in some of the examples.
I'm experiencing this issue on the v4 branch, but it seems to be a general problem not related to a specific version of FLORIS.
