Personal tools
You are here: Home Forum Use Can't import *.py files

Can't import *.py files

Up to Use

Can't import *.py files

Posted by Pablo Fuentes at August 01. 2012

Hello!

I'm new in Salome and I'm doing the tutorial. All was working good but when I've tried to import the .py file wich is given in OCC3 I couldn't do it. I Have the same problems with all the other .py. Could anyone help me please?

 

Regards

Re: Can't import *.py files

Posted by rana m timur at August 02. 2012

hi i m going through the same problem, if u resolve it then plz tell me too

thanks

 

Re: Can't import *.py files

Posted by Pablo Fuentes at August 02. 2012

I always get a similar error:

 

"File "D:/CESGA/Salome/SALOME-6.5.0-WIN32/Tutorial/bracket/Bracket.py", line 83, in <module>

Extrusion_step_1 = geompy.Import(extrusion_file, "STEP")

File "D:\CESGA\Salome\SALOME-6.5.0-WIN32\MODULES\GEOM\bin\salome\geompyDC.py", line 7109, in Import

RaiseIfFailed("Import", self.InsertOp)

File "D:\CESGA\Salome\SALOME-6.5.0-WIN32\MODULES\GEOM\bin\salome\geompyDC.py", line 95, in RaiseIfFailed

raise RuntimeError, Method_name + " : " + Operation.GetErrorCode()

RuntimeError: Import : Wrong format of the imported file. Can't import file. "

Re: Can't import *.py files

Posted by Saint Michael at August 02. 2012

Previously Pablo Fuentes wrote:

I always get a similar error:

 

"File "D:/CESGA/Salome/SALOME-6.5.0-WIN32/Tutorial/bracket/Bracket.py", line 83, in <module>

Extrusion_step_1 = geompy.Import(extrusion_file, "STEP")

Hello Pablo

Have you tuned the path to extrusion_file as it is required in the script?

# provide your own path to the file !!!
extrusion_file = "Extrusion.step"

St.Michael

 

Re: Can't import *.py files

Posted by Pablo Fuentes at August 03. 2012

Previously Saint Michael wrote:

Previously Pablo Fuentes wrote:

I always get a similar error:

 

"File "D:/CESGA/Salome/SALOME-6.5.0-WIN32/Tutorial/bracket/Bracket.py", line 83, in <module>

Extrusion_step_1 = geompy.Import(extrusion_file, "STEP")

Hello Pablo

Have you tuned the path to extrusion_file as it is required in the script?

# provide your own path to the file !!!
extrusion_file = "Extrusion.step"

St.Michael

 

Thank you St.Michael now it works perfectly :D

 

Re: Can't import *.py files

Posted by Vadim SANDLER at August 06. 2012

Hello,

The archive bracket.zip used in Tutorial example OCC#3 has been updated with the corrected version of Bracket.py script. It should now work properly without any manual modification of the script.

 Regards,
Vadim.

Powered by Ploneboard
Document Actions