Error in importing 3D mesh generated from gmsh into fipy












0














I am having a lot trouble importing 3D mesh from gmsh to fipy. I have looked through all the questions regarding gmsh and fipy on this forum, but unfortunately I didn't find a similar topic.



I am importing a 3D cylindrical mesh generated by gmsh 4.0 into FiPy. I am currently using python 2.7, and my operation system is Windows 10, 64-bit.



According to fipy manual, the Gmsh3D function should convert the gmsh mesh into a fipy mesh, and thus I wrote:



from fipy import * 

mesh = Gmsh3D('C:UsersWilliamDocumentsPython Scriptscylinder3.msh')


In addition, my Gmsh exe, the mesh (cylinder.msh) as well as my python code are all located in the same directory.



However, I kept getting "[Error 32] The process cannot access the file because it is being used by another process". I am attaching the full error message below. Anyone experienced and have solved this issue? Any pointer is appreciated. Thanks in advance!



Full error message:



runfile('C:/Users/William/Documents/Python Scripts/cylinder1.py', wdir='C:/Users/William/Documents/Python Scripts')


Traceback (most recent call last):



File "<ipython-input-1-c2ebfb9899c3>", line 1, in <module>
runfile('C:/Users/William/Documents/Python Scripts/cylinder1.py', wdir='C:/Users/William/Documents/Python Scripts')

File "C:UsersWilliamAnaconda2libsite-packagesspyder_kernelscustomizespydercustomize.py", line 668, in runfile
execfile(filename, namespace)

File "C:UsersWilliamAnaconda2libsite-packagesspyder_kernelscustomizespydercustomize.py", line 93, in execfile
exec(compile(scripttext, filename, 'exec'), glob, loc)

File "C:/Users/William/Documents/Python Scripts/cylinder1.py", line 23, in <module>
mesh = Gmsh3D('C:UsersWilliamDocumentsPython Scriptscylinder3.msh')

File "C:UsersWilliamAnaconda2libsite-packagesfipymeshesgmshMesh.py", line 1944, in __init__
self._orderedCellVertexIDs_data) = self.mshFile.read()

File "C:UsersWilliamAnaconda2libsite-packagesfipymeshesgmshMesh.py", line 853, in read
os.unlink(self.elemsPath)

WindowsError: [Error 32] The process cannot access the file because it is being used by another process: 'c:\users\william\appdata\local\temp\tmp1bhyl6Elements'









share|improve this question




















  • 1




    Do you have any software that's somehow managing to access the temporary file immediately after it's being created (like an antivirus suite)?
    – Blender
    Dec 28 '18 at 8:23


















0














I am having a lot trouble importing 3D mesh from gmsh to fipy. I have looked through all the questions regarding gmsh and fipy on this forum, but unfortunately I didn't find a similar topic.



I am importing a 3D cylindrical mesh generated by gmsh 4.0 into FiPy. I am currently using python 2.7, and my operation system is Windows 10, 64-bit.



According to fipy manual, the Gmsh3D function should convert the gmsh mesh into a fipy mesh, and thus I wrote:



from fipy import * 

mesh = Gmsh3D('C:UsersWilliamDocumentsPython Scriptscylinder3.msh')


In addition, my Gmsh exe, the mesh (cylinder.msh) as well as my python code are all located in the same directory.



However, I kept getting "[Error 32] The process cannot access the file because it is being used by another process". I am attaching the full error message below. Anyone experienced and have solved this issue? Any pointer is appreciated. Thanks in advance!



Full error message:



runfile('C:/Users/William/Documents/Python Scripts/cylinder1.py', wdir='C:/Users/William/Documents/Python Scripts')


Traceback (most recent call last):



File "<ipython-input-1-c2ebfb9899c3>", line 1, in <module>
runfile('C:/Users/William/Documents/Python Scripts/cylinder1.py', wdir='C:/Users/William/Documents/Python Scripts')

File "C:UsersWilliamAnaconda2libsite-packagesspyder_kernelscustomizespydercustomize.py", line 668, in runfile
execfile(filename, namespace)

File "C:UsersWilliamAnaconda2libsite-packagesspyder_kernelscustomizespydercustomize.py", line 93, in execfile
exec(compile(scripttext, filename, 'exec'), glob, loc)

File "C:/Users/William/Documents/Python Scripts/cylinder1.py", line 23, in <module>
mesh = Gmsh3D('C:UsersWilliamDocumentsPython Scriptscylinder3.msh')

File "C:UsersWilliamAnaconda2libsite-packagesfipymeshesgmshMesh.py", line 1944, in __init__
self._orderedCellVertexIDs_data) = self.mshFile.read()

File "C:UsersWilliamAnaconda2libsite-packagesfipymeshesgmshMesh.py", line 853, in read
os.unlink(self.elemsPath)

WindowsError: [Error 32] The process cannot access the file because it is being used by another process: 'c:\users\william\appdata\local\temp\tmp1bhyl6Elements'









share|improve this question




















  • 1




    Do you have any software that's somehow managing to access the temporary file immediately after it's being created (like an antivirus suite)?
    – Blender
    Dec 28 '18 at 8:23
















0












0








0







I am having a lot trouble importing 3D mesh from gmsh to fipy. I have looked through all the questions regarding gmsh and fipy on this forum, but unfortunately I didn't find a similar topic.



I am importing a 3D cylindrical mesh generated by gmsh 4.0 into FiPy. I am currently using python 2.7, and my operation system is Windows 10, 64-bit.



According to fipy manual, the Gmsh3D function should convert the gmsh mesh into a fipy mesh, and thus I wrote:



from fipy import * 

mesh = Gmsh3D('C:UsersWilliamDocumentsPython Scriptscylinder3.msh')


In addition, my Gmsh exe, the mesh (cylinder.msh) as well as my python code are all located in the same directory.



However, I kept getting "[Error 32] The process cannot access the file because it is being used by another process". I am attaching the full error message below. Anyone experienced and have solved this issue? Any pointer is appreciated. Thanks in advance!



Full error message:



runfile('C:/Users/William/Documents/Python Scripts/cylinder1.py', wdir='C:/Users/William/Documents/Python Scripts')


Traceback (most recent call last):



File "<ipython-input-1-c2ebfb9899c3>", line 1, in <module>
runfile('C:/Users/William/Documents/Python Scripts/cylinder1.py', wdir='C:/Users/William/Documents/Python Scripts')

File "C:UsersWilliamAnaconda2libsite-packagesspyder_kernelscustomizespydercustomize.py", line 668, in runfile
execfile(filename, namespace)

File "C:UsersWilliamAnaconda2libsite-packagesspyder_kernelscustomizespydercustomize.py", line 93, in execfile
exec(compile(scripttext, filename, 'exec'), glob, loc)

File "C:/Users/William/Documents/Python Scripts/cylinder1.py", line 23, in <module>
mesh = Gmsh3D('C:UsersWilliamDocumentsPython Scriptscylinder3.msh')

File "C:UsersWilliamAnaconda2libsite-packagesfipymeshesgmshMesh.py", line 1944, in __init__
self._orderedCellVertexIDs_data) = self.mshFile.read()

File "C:UsersWilliamAnaconda2libsite-packagesfipymeshesgmshMesh.py", line 853, in read
os.unlink(self.elemsPath)

WindowsError: [Error 32] The process cannot access the file because it is being used by another process: 'c:\users\william\appdata\local\temp\tmp1bhyl6Elements'









share|improve this question















I am having a lot trouble importing 3D mesh from gmsh to fipy. I have looked through all the questions regarding gmsh and fipy on this forum, but unfortunately I didn't find a similar topic.



I am importing a 3D cylindrical mesh generated by gmsh 4.0 into FiPy. I am currently using python 2.7, and my operation system is Windows 10, 64-bit.



According to fipy manual, the Gmsh3D function should convert the gmsh mesh into a fipy mesh, and thus I wrote:



from fipy import * 

mesh = Gmsh3D('C:UsersWilliamDocumentsPython Scriptscylinder3.msh')


In addition, my Gmsh exe, the mesh (cylinder.msh) as well as my python code are all located in the same directory.



However, I kept getting "[Error 32] The process cannot access the file because it is being used by another process". I am attaching the full error message below. Anyone experienced and have solved this issue? Any pointer is appreciated. Thanks in advance!



Full error message:



runfile('C:/Users/William/Documents/Python Scripts/cylinder1.py', wdir='C:/Users/William/Documents/Python Scripts')


Traceback (most recent call last):



File "<ipython-input-1-c2ebfb9899c3>", line 1, in <module>
runfile('C:/Users/William/Documents/Python Scripts/cylinder1.py', wdir='C:/Users/William/Documents/Python Scripts')

File "C:UsersWilliamAnaconda2libsite-packagesspyder_kernelscustomizespydercustomize.py", line 668, in runfile
execfile(filename, namespace)

File "C:UsersWilliamAnaconda2libsite-packagesspyder_kernelscustomizespydercustomize.py", line 93, in execfile
exec(compile(scripttext, filename, 'exec'), glob, loc)

File "C:/Users/William/Documents/Python Scripts/cylinder1.py", line 23, in <module>
mesh = Gmsh3D('C:UsersWilliamDocumentsPython Scriptscylinder3.msh')

File "C:UsersWilliamAnaconda2libsite-packagesfipymeshesgmshMesh.py", line 1944, in __init__
self._orderedCellVertexIDs_data) = self.mshFile.read()

File "C:UsersWilliamAnaconda2libsite-packagesfipymeshesgmshMesh.py", line 853, in read
os.unlink(self.elemsPath)

WindowsError: [Error 32] The process cannot access the file because it is being used by another process: 'c:\users\william\appdata\local\temp\tmp1bhyl6Elements'






python mesh fipy






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Dec 28 '18 at 8:14









рüффп

3,328145391




3,328145391










asked Dec 28 '18 at 7:39









William YeWilliam Ye

1




1








  • 1




    Do you have any software that's somehow managing to access the temporary file immediately after it's being created (like an antivirus suite)?
    – Blender
    Dec 28 '18 at 8:23
















  • 1




    Do you have any software that's somehow managing to access the temporary file immediately after it's being created (like an antivirus suite)?
    – Blender
    Dec 28 '18 at 8:23










1




1




Do you have any software that's somehow managing to access the temporary file immediately after it's being created (like an antivirus suite)?
– Blender
Dec 28 '18 at 8:23






Do you have any software that's somehow managing to access the temporary file immediately after it's being created (like an antivirus suite)?
– Blender
Dec 28 '18 at 8:23














0






active

oldest

votes











Your Answer






StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53955192%2ferror-in-importing-3d-mesh-generated-from-gmsh-into-fipy%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes
















draft saved

draft discarded




















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.





Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


Please pay close attention to the following guidance:


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53955192%2ferror-in-importing-3d-mesh-generated-from-gmsh-into-fipy%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Monofisismo

Angular Downloading a file using contenturl with Basic Authentication

Olmecas