Butterfly 0.0.05 bluecfd io error

Same problem here in blockMesh:

  1. Solution exception:The handle is invalid.
    The handle is invalid.
    The handle is invalid.
    The handle is invalid.
    The handle is invalid.
    tee: failed to reopen ‘stdout’ with mode ‘wb’: Bad file descriptor

–> FOAM FATAL IO ERROR:
error in IOstream “Sout” for operation Ostream& operator<<(Ostream&, const char*)

file: Sout at line 16.

From function virtual bool Foam::IOstream::check(const char*) const
in file db/IOstreams/IOstreams/IOstream.C at line 96.

FOAM exiting

Anyone got it solved?

Hi @jck,
Have you find any solutions yet?I faced the same issue!

  1. Solution exception:Generating stack trace…

–> FOAM FATAL IO ERROR:
error in IOstream “Sout” for operation Ostream& operator<<(Ostream&, const char*)

file: Sout at line 97.

From function virtual bool Foam::IOstream::check(const char*) const
in file db/IOstreams/IOstreams/IOstream.C at line 96.

FOAM exiting

@mostapha, I am running into this same issue on windows 7 and 10. Are there any other locations of log files or places to look that might indicate what’s causing the error?

Updating cell size in blockMeshDict.
Updating grading in blockMeshDict.
Saved changes to blockMeshDict to:
C:\Users\chanley\butterfly\outdoor_airflow\system\blockMeshDict
Runtime error (PythonException): The handle is invalid.
The handle is invalid.
The handle is invalid.
The handle is invalid.
The handle is invalid.
tee: failed to reopen 'stdout' with mode 'wb': Bad file descriptor


Traceback:
  line 278, in _handle_process, "C:\Users\chanley\AppData\Roaming\McNeel\Rhinoceros\6.0\scripts\butterfly\runmanager_bluecfd.py"
  line 213, in _run_ironpython, "C:\Users\chanley\AppData\Roaming\McNeel\Rhinoceros\6.0\scripts\butterfly\runmanager_bluecfd.py"
  line 234, in run, "C:\Users\chanley\AppData\Roaming\McNeel\Rhinoceros\6.0\scripts\butterfly\runmanager_bluecfd.py"
  line 756, in command, "C:\Users\chanley\AppData\Roaming\McNeel\Rhinoceros\6.0\scripts\butterfly\case.py"
  line 788, in blockMesh, "C:\Users\chanley\AppData\Roaming\McNeel\Rhinoceros\6.0\scripts\butterfly\case.py"
  line 52, in script

edit: this is when running the sample file 01_0_OutdoorAirFlow.gh

hello all,

getting a similar but not identical issue here. Have any of you had any luck? I get this message whether I am running rhino as admin or not.

Updating cell size in blockMeshDict.
Updating grading in blockMeshDict.
Saved changes to blockMeshDict to:
D:\Users\07093\butterfly\outdoor_airflow\system\blockMeshDict
Runtime error (Win32Exception): WindowsError

Traceback:
line 232, in run, “D:\Users\07093\AppData\Roaming\McNeel\Rhinoceros\6.0\scripts\butterfly\runmanager_bluecfd.py”
line 756, in command, “D:\Users\07093\AppData\Roaming\McNeel\Rhinoceros\6.0\scripts\butterfly\case.py”
line 788, in blockMesh, “D:\Users\07093\AppData\Roaming\McNeel\Rhinoceros\6.0\scripts\butterfly\case.py”
line 52, in script

@kvwxyz I suggest you install Rhino at Drive C.

I believe Rhino is installed on C. (shortcut points to C:\Program Files\Rhino 6\System), although this is a complex corporate network so I didn’t install it myself.

@kvwxyz I got it. Can you run rhino and blueCFD as admin?

I normally cannot (apparently it’s not necessary for this version of butterfly, as Mostapha confirmed for me), although I have run rhino as admin to check if that was the issue. However I still got the same error message.
thanks,

edit: to clarify, I did not try running CFD core as admin, only rhino.

1. Solution exception:The handle is invalid.
The handle is invalid.
The handle is invalid.
The handle is invalid.
The handle is invalid.
tee: failed to reopen ‘stdout’ with mode ‘wb’: Bad file descriptor

*–> FOAM FATAL IO ERROR: **
error in IOstream “Sout” for operation Ostream& operator<<(Ostream&, const char)

file: Sout at line 53.

** From function virtual bool Foam::IOstream::check(const char*) const**
** in file db/IOstreams/IOstreams/IOstream.C at line 96.**

FOAM exiting

Same here. I got the same error in BLOCKMESH phase while running outdoor airflow.

I am using Window 7 and tried run Rhino and BlueCFD as admin but doesn’t work.

Can any hero help with this?

hi, I have the same problem as you. Have you solved it?

i am having exactly the same problem as you and @kvwxyz . I created a new thread with this issue. Lets hope it gets solved soon!

Hi @Werido , hi @nach ,
Sorry, my project moved on past the stage where i could usefully incorporate butterfly, so I could not spend any more time trying to get it to work. I’m only coming back to this now - seems like may people are having a similar problem. Let me know if you could get anything to work…
Kevin

I am really sorry for disturbing,but I have tested several vision of rhino in windows 7 including rhino 6.12/6.2/6.5/6.8.
Same mistake shows in the exact same line of runmanager_bluecfd.py and case.py listed above.
when it comes to rhino 6.12/6.2 which means that there’s no need to install microsoftvisualc++2017, the error goes"Unable to translate bytes [BE] at index 0 from specified code page to Unicode" which happened in a HB issue here.

When it comes to 6.5/6.8, the error is as same as the problems listed above. I am poor in Python but may be these messages can be of little help.

Is there a fix/solution for this? I’m coming back to this on a windows 7 machine, Rhino 6, and am getting the same error as I had before.
Things I have verified on workstation:
Running Rhino 6 as admin
Blue-CFD core terminal running as Admin (environment ready).
Able to read/write to butterfly folder, (tested with simple code below)

parent_dir = 'C:/Users/chanley/butterfly/'
directory = "SomeNewDirectory"
path = os.path.join(parent_dir, directory) 

try: 
    os.mkdir(path) 
except OSError as error: 
    print(error)   

All programs installed with default settings, (US english langauge, no other language packs being used, default directories, etc…)
Anyone have any suggestions?

is it possible that this could be related to a path issue? As in, if a user account is in a domain, sometimes the path might come back as C:\Users\chanley.DOMAIN\appdata\etc… VS C:\Users\chanley\appdata…?
Just a shot in the dark. I am also testing on a brand new windows 10 machine…but still no luck.

I am having exactly the same problem.

hi, i just meet something similar. But not exact same.


And to solve this i found the link:WindowError win32 exception · Issue #382 · ladybug-tools/butterfly · GitHub
BUT this solution will affect creating case from geometries :disappointed_relieved:

Hi @Lincy As I know,Butterfly V0.0.05 only support BlueCFD 2017-1 Version. Please uninstall BlueCFD 2020 and install BlueCFD 2017-1.

Hello Dears,
I have almost the same problem with Blue CFD and the Example file “01_0_outdoor_airflow”.


so I installed Rhino 7 but unfortunately There isnt any Grasshopper link for Rhino 7.
what can I do?

1 Like

Butterfly Version 0.0.05 only support blueCore-CFD 2017-1 Version. Uninstall blueCore-CFD-2020 and install blueCore-CFD 2017-1 Version.

1 Like