FreeCad 0.19 pre-release version (same occurs on the Freecad 0.18 release) on macOS.
Step file is at https://filebin.ca/5Am0GxMP72Oi/OM-O2S.step (too large to upload here)
Got this in the console for output:
/Applications/FreeCAD.app/Contents/Resources/lib/python3.8/site-packages/numpy/ma/core.py:4466: SyntaxWarning: "is" with a literal. Did you mean "=="?
if self.shape is ():
A3 available
/Applications/FreeCAD.app/Contents/Resources/lib/python3.8/site-packages/mpmath/ctx_mp_python.py:892: SyntaxWarning: "is" with a literal. Did you mean "=="?
if other is 0:
/Applications/FreeCAD.app/Contents/Resources/lib/python3.8/site-packages/mpmath/ctx_mp_python.py:986: SyntaxWarning: "is" with a literal. Did you mean "=="?
if other is 0:
Traceback (most recent call last):
File "<string>", line 1, in <module>
<class 'OSError'>: cannot read STEP file
Any ideas?
Error when importing .step file
Forum rules
and Helpful information
and Helpful information
IMPORTANT: Please click here and read this first, before asking for help
Also, be nice to others! Read the FreeCAD code of conduct!
Also, be nice to others! Read the FreeCAD code of conduct!
Re: Error when importing .step file
These are warnings, not errors. They seem to be harmless. See the following thread.
Errors on startup
However, your problem is a bit different because you get an actual errorvocx wrote: ↑Wed Jan 29, 2020 4:38 pmAs looo says, these are not errors, they are warnings. Specifically, these are warnings in the syntax of the programming language.chrisb wrote: ↑Tue Jan 28, 2020 6:45 pm ...The previous version used Python3.8 as well and did not show these errors.Code: Select all
... /Users/cb/Desktop/FreeCAD.app/Contents/Resources/lib/python3.8/site-packages/mpmath/ctx_mp_python.py:986: SyntaxWarning: "is" with a literal. Did you mean "=="? if other is 0:
These warnings do no occur in FreeCAD's code, they occur in Python 3.8's code, inside numpy and mpmath libraries. I don't understand why this would happen. It's like the Python guys wrote something wrong. Maybe this is already corrected in another version of Python 3.8.y.
Code: Select all
Traceback (most recent call last):
File "<string>", line 1, in <module>
<class 'OSError'>: cannot read STEP file
Try reading other Step files. Can you use a smaller Step file, based on the bigger one? Can you remove some components of that Step file and try again?
Last edited by vocx on Sat Feb 01, 2020 2:25 am, edited 1 time in total.
Always add the important information to your posts if you need help. Also see Tutorials and Video tutorials.
To support the documentation effort, and code development, your donation is appreciated: liberapay.com/FreeCAD.
To support the documentation effort, and code development, your donation is appreciated: liberapay.com/FreeCAD.
Re: Error when importing .step file
I don't have access to the original file, I was provided this step file as is.
In terms of what might have happened I downloaded and saved two files from the same email into the Downloads folder. The .stl file opens but this is just a block model, the .step file doesn't and reports the error you saw. I can't imagine there are different permissions but I did check to confirm that the .step file has the proper permissions. I can only imagine that for some reason the internal step file loader is what is throwing the OSError.
In terms of what might have happened I downloaded and saved two files from the same email into the Downloads folder. The .stl file opens but this is just a block model, the .step file doesn't and reports the error you saw. I can't imagine there are different permissions but I did check to confirm that the .step file has the proper permissions. I can only imagine that for some reason the internal step file loader is what is throwing the OSError.
Re: Error when importing .step file
When downloaded the file seems a STEP file.
Opening it with a text file displays everithing as it should...
I tried to open it with CADAssistant of OCC and it fails too...
Then it seems an issue of OCC parser or an issue of the other CAD that exported the model.
Opening it with a text file displays everithing as it should...
I tried to open it with CADAssistant of OCC and it fails too...
Then it seems an issue of OCC parser or an issue of the other CAD that exported the model.
Re: Error when importing .step file
For those who come here from search-engines, as i did...
Error:
Solution, that worked for me:
Open .step file in text editor.
Edit the line, starting with
Enter correct filename (no spaces, etc.)
Save.
Import in Freecad.
BR
Error:
Code: Select all
Traceback (most recent call last):
File "<string>", line 1, in <module>
<class 'OSError'>: cannot read STEP file
Open .step file in text editor.
Edit the line, starting with
Code: Select all
FILE_NAME(
'/home/.../123.step',
'2020-10-14T12:36:15',('Author'),(''),
'Open CASCADE STEP processor 7.4','FreeCAD','Unknown');
Save.
Import in Freecad.
BR
Re: Error when importing .step file
I didn't understand how to solve this problem dude, can you explain a little bit more?
Pablonen wrote: ↑Tue Nov 03, 2020 10:21 am For those who come here from search-engines, as i did...
Error:Solution, that worked for me:Code: Select all
Traceback (most recent call last): File "<string>", line 1, in <module> <class 'OSError'>: cannot read STEP file
Open .step file in text editor.
Edit the line, starting with
Enter correct filename (no spaces, etc.)Code: Select all
FILE_NAME( '/home/.../123.step', '2020-10-14T12:36:15',('Author'),(''), 'Open CASCADE STEP processor 7.4','FreeCAD','Unknown');
Save.
Import in Freecad.
BR
Re: Error when importing .step file
The "dude" never returned to the forum again. (At least never logged in.)
If you have a question why don't you spell out exactly the problem you are seeing in new topic? A lot has changed in FreeCAD over the past three years.
Gene