When trying to do this in a new document I get this error:
importing part from C:/Users/Lenovo Yoga/3D Objects/disc.FCStd
Running the Python command 'assembly2_importPart' failed:
Traceback (most recent call last):
File "C:\Users\Lenovo Yoga\AppData\Roaming\FreeCAD\Mod\assembly2\assembly2\importPart\__init__.py", line 152, in Activated
importedObject = importPart( filename )
File "C:\Users\Lenovo Yoga\AppData\Roaming\FreeCAD\Mod\assembly2\assembly2\importPart\__init__.py", line 39, in importPart
doc = Fcstd_File_Parser( filename )
File "C:\Users\Lenovo Yoga\AppData\Roaming\FreeCAD\Mod\assembly2\assembly2\importPart\fcstd_parser.py", line 79, in __init__
obj.Shape.importBrepFromString( z.open( shape_zip_name ).read() )
argument 1 must be str, not bytes
Nothing is imported.
Bug Report: Assembly 2 - Import a part from another FreeCAD document
Forum rules
Be nice to others! Read the FreeCAD code of conduct!
Be nice to others! Read the FreeCAD code of conduct!
Bug Report: Assembly 2 - Import a part from another FreeCAD document
- Attachments
-
- disc.FCStd
- (8.2 KiB) Downloaded 44 times
- wandererfan
- Veteran
- Posts: 6326
- Joined: Tue Nov 06, 2012 5:42 pm
- Contact:
Re: Bug Report: Assembly 2 - Import a part from another FreeCAD document
My understanding is that Assembly2 is no longer maintained and that A2plus_Workbench should be used instead.
The error message looks to be python2 style string handling in a python3 environment.
Re: Bug Report: Assembly 2 - Import a part from another FreeCAD document
Thanks All, I'll give A2Plus a go.
Re: Bug Report: Assembly 2 - Import a part from another FreeCAD document
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
Re: Bug Report: Assembly 2 - Import a part from another FreeCAD document
I don't agree with the split. The other posts give context as to why Assembly2 should be considered obsolete, and should not be used anymore. It provided an explanation as to why the error is probably in the string handling of Assembly2, and not in FreeCAD itself. A future user who finds this thread may not follow the link to that discussion.chrisb wrote: ↑Fri Sep 13, 2019 6:01 am I have moved some of the posts in this topic to a new one: State of Assembly2.
I hope you agree.
Well, you provided a link to the other thread, so I guess it's fine.
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.