Welcome to the forums. Please post in English or French.

You are not logged in.

#1 2016-09-28 06:02:44

Kevin-JS
Member
Registered: 2015-07-31
Posts: 19

Can't find the module _aster_core when importing module partition

Hi all,

I am a beginner in using code_aster. What I am trying to do is to calculate a geometry deformation based on a file which gives the pressure of each mesh element. Referring to http://code-aster.org/forum2/viewtopic.php?id=14692 and http://code-aster.org/forum2/viewtopic.php?id=16277, I come up with the idea to resort to python script. However, I was struggling in importing partition module like

Bracchesimo wrote:

import sys
sys.path.append( '/opt/SALOME-MECA-2010.1-x86_64/aster/STA10.1/bibpyt/Utilitai' )
from Utilitai.partition import *
from partition import *

. My python showed that

ImportError: No module named aster_core

. After I appended the path of aster_core to the sys, it came out the error like this

ImportError: No module named _aster_core

. I have searched the whole Salome file and aster file, and found nothing named _aster_core. As I know through the forum, hips of people work on using aster by python and sometimes they should need to import Utilitai.partition. But none of them mentioned the error I encountered with. I assume there is something wrong with my software installation. Could anyone give me a hint? I totally run out out ideas.

Offline

#2 2018-03-13 12:35:42

supersunyan
Member
Registered: 2018-02-12
Posts: 3

Re: Can't find the module _aster_core when importing module partition

Hi Kevin,
I have met the same problem. Have you solved it? If yes, can you share your experience?
Regards,
Yan

Offline

#3 2018-03-13 22:59:21

Kevin-JS
Member
Registered: 2015-07-31
Posts: 19

Re: Can't find the module _aster_core when importing module partition

Hi Yan,

I had this problem when I ran this single command in the Python GUI instead of running it within a whole Aster script. I assume the Utilitai module cannot be used independently. It has to be incorporated in a script.

Kevin

Offline

Board footer