-
Notifications
You must be signed in to change notification settings - Fork 63
ImportError: attempted relative import with no known parent package #19
Comments
Instead of calling the script directly, you can try importing it in stead within pyFAST. You can see some example syntax here for instance: https://github.com/OpenFAST/python-toolbox/blob/main/pyFAST/input_output/README.md |
Dear @ebranlard, Thank you for your reply, that was a stupid mistake I made, and now I can use it to read and write .fst files, but when I tried to run the .fst files, this error occurred, it's shown in the screen shot, can you explain why ? But no such error occurred when I use it to read and write .dat files . Thank you in advance! |
Dear @ebranlard , Sorry for bothering you again, but it's been a few days after I asked you this question and I have tried so many times to fix it but didn't figure it out , so could you please tell me why the error occurred? Best regards |
Dear @Unique-Wang, I don't think this is a python-toolbox issue, it seems that some of your files are not found. One possible option is that you need to put your slashes in the other direction (it could be that openfast didn't detect that one of your path was absolute and it's trying to concatenate both. This could be why you see "D:" at the end of the file path). Instead of using the python-toolbox, you can try to edit your input files manually until they work, edit the paths one by one, starting from a model that already works. I hope that helps! |
Sorry ,I just figured out what's wrong with my script and I was about to close this issue and then I saw your reply . Yes, it's definitely not an issue of your toolbox which is a masterpiece indeed . There's so much I need to learn about python ,so it's always much harder for me to right my mistakes than to make mistakes . Anyway ,thank you for your reply and have a good night! |
No worries, I'm glad you solved it! |
Dear @ebranlard ,
It's me again ,when I was trying to use fast_input_file.py to read and write .fst files ,the error occurred,it's shown in the screenshot down below, I don't understand how to fix it,could you please help me with that?
![1629960340(1)](https://user-images.githubusercontent.com/87693817/130914367-e58d0e9a-69cb-4a32-86d0-5efa3f982820.png)
Thank you in advance!
Best regards
The text was updated successfully, but these errors were encountered: