-
Notifications
You must be signed in to change notification settings - Fork 156
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issues when running FLORIS 4.1.1 #951
Comments
Bringing over comments from discussion: Comment by @HDW7812: Comment by @misi9170: If you are using this within a conda environment, could you share the list of packages you have installed? As @HDW7812 pointed out, this could be something to do with package versions in your environment, especially if you are using the same environment you were running v3.5 with. As also pointed out by @HDW7812 , starting with a fresh conda environment and a fresh pip install of FLORIS may solve your issue. I'm going to convert this discussion to an issue in the meantime. Cheers, |
Hi @misi9170, I tried creating a new environment and install floris again and I'm still getting the same error.
please do let me know if you need any other information. Thanks! |
Hi @prith-gs, |
@jfrederik-nrel , @Bartdoekemeijer 's comment above reminded me---was this the same issue I talked about with you a few months back? I recall an issue with loading turbines having to do with a piece of code not correctly building a path when running on Windows |
I don't think it's the same thing to be honest, I think we resolved that issue. For reference, the issue you are referring to is #873. |
Ah ok, thanks @jfrederik-nrel ! |
I added windows back to continuous-integration and there is an issue with Windows for python 3.8 and 3.9, PR #953 |
Hello @misi9170 @paulf81 @Bartdoekemeijer I was indeed using python v3.8.1 and had this issue for FLORIS v4.x and not for v3.x. Appreciate the help! :) Will this be sorted for python v3.8 and 3.9 in further releases? or do I have to switch to python >= v3.10 for FLORIS v4.0 and above? Thanks! |
Glad that you got this working. Right, the issue here seems to be limited to older python versions (3.8 and 3.9, and likely earlier versions) running on Windows systems. We will likely not try to address this, and shift support to python 3.10 and above. I will discuss with other Floris developers and confirm. At this stage, do you have a specific need to run Floris with an earlier version of python? Cheers, |
I'm working with some inhouse packages which are written for python 3.8 and hence I'm using FLORIS with an older version of python. If it can be modified to work with the previous version that'll be nice, if not it's still fine, we are probably due for an upgrade anyway. Appreciate the help! BR, |
Yet another reason to upgrade to Python 3.11 or higher: https://docs.python.org/3/whatsnew/3.11.html.
|
Hey, there. Thanks for posting this issue! I run into the same issue using python 3.9. Maybe one could update
Best, |
Thanks for the suggestion, Johannes! Agreed that the versioning listed in setup.py is misleading, and thank you for the suggestion of having platform-depending versions. We've actually recently been discussing moving to relying solely on pyproject.toml, rather than setup.py, for package requirements. At that stage, we may shift to requiring We will try to post updates in this issue thread as we make decisions regarding package management updates and python version support. Cheers, |
I spent some time looking into this and here's what I've found. The issue in FLORIS is located in type_dec.convert_to_path. This function is meant to resolve a truncated path to either an absolute path (i.e. starting with To find the relative path, the function uses the
However, since FLORIS uses #951 (comment) points out that this works for Python 3.10 and above, so why is that and how does this work at all? The different behavior across Python versions is due to a change in For what it's worth, there have been multiple suggestions to change this behavior in
A similar backwards compatible change was made for As for FLORIS, I think the fix is to avoid the relative path search from the file of the calling-function. Currently, this will always be an For what it's worth, I also made a simple repository to show that this is indeed an issue across Python versions for Windows: https://github.com/rafmudaf/windows_path_error/actions/runs/11899793288. |
Thanks for sharing this comprehensive writeup, @paulf81 ! For what it's worth Python 3.9 is no longer actively supported, and is ending security updates as of October 31, 2025. Moreover, Python 3.8 is officially unsupported, so my thought would be to end support for Python 3.8/9 given it's a 3.8/9 issue. In a couple of other projects where we were upgrading infrastructure, we also made the decision to support 3.10+ in their latest releases. As for how to handle the |
Thanks @RHammond2 for your helpful comments! |
Discussed in #950
Originally posted by prith-gs July 26, 2024
Hello,
I'm trying to run example 01 with FLORIS 4.1.1 and I don't get this error in FLORIS 3.5 and I'm not sure why I get this error.
Here's the code I'm running where I am reading the input yaml file using FlorisModel function in line 9 and I'm using a function I found online in line 4 and 5.
Line 4 and 5 executes properly and has no issues in reading the yaml file and I can see the variable 'data' as well
Here's what's stored in the variable data
But line 9 gives me the following error and I'm not clear why I'm getting this error
Any help is much appreciated.
Thanks!
The text was updated successfully, but these errors were encountered: