Found and fixed a type cast missing in FAST_writer.py - #3435
Merged
Conversation
At L:620 of FAST_writer.py contains a str + int type error. Patched with the missing str() casting function
This was referenced Aug 17, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Ready to merge
Feature or improvement description
This PR fixes a TypeError in
FAST_writer.pywhen writing ElastoDyn blade files with a blade index. The issue occurred at line 620 where string concatenation with an integer was performed without proper type casting.Changes:
str()cast around(bldInd+1)to properly convert integer to string before concatenationwriter.execute()whenwrite_ElastoDynBlade()is called with a blade index parameterRelated issue, if one exists
Fixes #3431 -- reported and fixed by @jcvem
Impacted areas of the software
openfast_io/FAST_writer.py- ElastoDyn blade file writerwrite_ElastoDynBlade()method when writing blade files for indices 1 and 2Additional supporting information
The bug was reported by @jcvem and caused a TypeError when trying to write ElastoDyn blade input files. The issue was that when
bldIndis not None, the code attempted to concatenate a string'BldFile'with an integer(bldInd+1)without converting it to a string first.Before:
After:
Generative AI usage
None
Test results, if applicable
This is a simple type cast fix that does not affect the logic or output of the code, only prevents a runtime error. No regression test updates are expected to be necessary.