I think it's possible that Popen can't find gmsh, rather than not being able to 
find your .geo or .msh file. I'm not in a position to diagnose right now, but 
hopefully somebody familiar with Windows can help you diagnose. My approach 
would be to write some simple scripts, separate from FiPy, to invoke gmsh via 
Popen with simple combinations of arguments and known files.


> On Jul 27, 2016, at 12:45 PM, Michael Ghijs <[email protected]> wrote:
> 
> UPDATE: both files (.gmsh and .msh) are present, Popen() could not find them 
> though.
> At line 226-229 in gmshMesh.py:
> 
> 
>                 while True:
>                     print ["gmsh", geoFile] + gmshFlags + ["-o", mshFile]
>                     p = Popen(["gmsh", geoFile] + gmshFlags + ["-o", mshFile],
>                               stdout=PIPE)
> the first argument comes out as :
> ['gmsh', <path to .gmsh>, '-2', '-nopopup', '-format', 'msh', '-o', <path to 
> .msh>]
> 
> Thanks in advance!
> Michael
> 
> Op 27/07/2016 om 15:33 schreef Michael Ghijs:
>> Hi everyone, I am experiencing troubles with the fipy.Gmsh2D function with 
>> string-wise script input in the circle diffusion example.
>> Please find the script in attachment (and note that I applied a little trick 
>> to circumvent the Gmsh version error). Running it       gives me this error:
>> 
>> Traceback (most recent call last):
>>   File "<stdin>", line 1, in <module>
>>   File 
>> "C:\Programs\Anaconda\lib\site-packages\spyderlib\widgets\externalshell\sitecustomize.py",
>>  line 685, in runfile
>>     execfile(filename, namespace)
>>   File 
>> "C:\Programs\Anaconda\lib\site-packages\spyderlib\widgets\externalshell\sitecustomize.py",
>>  line 71, in execfile
>>     exec(compile(scripttext, filename, 'exec'), glob, loc)
>>   File 
>> "C:/Users/Michael/Desktop/wuirkspees/fipybug/circular_diffusion_gmsh2DProb.py",
>>  line 25, in <module>
>>     mesh = fipy.Gmsh2D(mesh_string) 
>>   File "C:\Programs\Anaconda\lib\site-packages\fipy\meshes\gmshMesh.py", 
>> line 1578, in __init__
>>     background=background)
>>   File "C:\Programs\Anaconda\lib\site-packages\fipy\meshes\gmshMesh.py", 
>> line 228, in openMSHFile
>>     stdout=PIPE)
>>   File "C:\Programs\Anaconda\lib\subprocess.py", line 710, in __init__
>>     errread, errwrite)
>>   File "C:\Programs\Anaconda\lib\subprocess.py", line 958, in _execute_child
>>     startupinfo)
>> WindowsError: [Error 2] The system cannot find the file specified
>> 
>> It seems something goes wrong in the temporary file creation in the 
>> openMSHFile()-function in gmshMesh.py since it can not find the file with 
>> Popen() at line 227. 
>> If anyone could assist me with this it would be really great.
>> Thank you in advance!
>> Michael
>>  
>> -- 
>> ---
>> ir. Michael Ghijs
>> 
>> PhD Researcher
>> BIOMATH - Model based bioprocess analysis and optimisation
>> LFPAT - Laboratory of Pharmaceutical Process Analytical Technology
>> Ghent University
>> 
>> Faculty of Bioscience Engineering
>> Coupure Links 653, B-9000 Gent, Belgium
>> Phone: +32 (0)473 84.92.81
>> 
>> 
>> 
>> _______________________________________________
>> fipy mailing list
>> 
>> [email protected]
>> http://www.ctcms.nist.gov/fipy
>> 
>>   [ NIST internal ONLY: 
>> https://email.nist.gov/mailman/listinfo/fipy
>>  ]
>> 
> 
> _______________________________________________
> fipy mailing list
> [email protected]
> http://www.ctcms.nist.gov/fipy
>  [ NIST internal ONLY: https://email.nist.gov/mailman/listinfo/fipy ]


_______________________________________________
fipy mailing list
[email protected]
http://www.ctcms.nist.gov/fipy
  [ NIST internal ONLY: https://email.nist.gov/mailman/listinfo/fipy ]

Reply via email to