IfcOpenShell / IfcOpenShell

Open source IFC library and geometry engine
GNU Lesser General Public License v3.0
1.8k stars 715 forks source link

BlenderBIM: new file doesn't export #1570

Closed theoryshaw closed 3 years ago

theoryshaw commented 3 years ago

Video: https://www.dropbox.com/s/2hmcmul6bdkr4fd/2021-07-15_13-05-35.mp4?dl=0


Python: Traceback (most recent call last):
  File "C:\Users\ryan\AppData\Roaming\Blender Foundation\Blender\2.93\scripts\addons\blenderbim\bim\operator.py", line 44, in execute
    return IfcStore.execute_ifc_operator(self, context)
  File "C:\Users\ryan\AppData\Roaming\Blender Foundation\Blender\2.93\scripts\addons\blenderbim\bim\ifc.py", line 175, in execute_ifc_operator
    IfcStore.get_file().begin_transaction()
  File "C:\Users\ryan\AppData\Roaming\Blender Foundation\Blender\2.93\scripts\addons\blenderbim\libs\site\packages\ifcopenshell\file.py", line 99, in __getattr__
    return getattr(self.wrapped_data, attr)
  File "C:\Users\ryan\AppData\Roaming\Blender Foundation\Blender\2.93\scripts\addons\blenderbim\libs\site\packages\ifcopenshell\ifcopenshell_wrapper.py", line 1427, in <lambda>
    __getattr__ = lambda self, name: _swig_getattr(self, file, name)
  File "C:\Users\ryan\AppData\Roaming\Blender Foundation\Blender\2.93\scripts\addons\blenderbim\libs\site\packages\ifcopenshell\ifcopenshell_wrapper.py", line 80, in _swig_getattr
    raise AttributeError("'%s' object has no attribute '%s'" % (class_type.__name__, name))
AttributeError: 'file' object has no attribute 'begin_transaction'

location: <unknown location>:-1
Moult commented 3 years ago

Download file.py and entity_instance.py from here https://github.com/IfcOpenShell/IfcOpenShell/tree/v0.6.0/src/ifcopenshell-python/ifcopenshell and replace the one you have in blenderbim/libs/site/packages/ifcopenshell

I need to fix the build, I was waiting for a bot build, but I guess I shouldn't.

theoryshaw commented 3 years ago

no worries, i'll just wait for the bot build.

theoryshaw commented 3 years ago

same error w/ blender28-bim-210717-py39-win.zip

Python: Traceback (most recent call last):
  File "C:\Users\ryan\AppData\Roaming\Blender Foundation\Blender\2.93\scripts\addons\blenderbim\bim\operator.py", line 44, in execute
    return IfcStore.execute_ifc_operator(self, context)
  File "C:\Users\ryan\AppData\Roaming\Blender Foundation\Blender\2.93\scripts\addons\blenderbim\bim\ifc.py", line 175, in execute_ifc_operator
    IfcStore.get_file().begin_transaction()
  File "C:\Users\ryan\AppData\Roaming\Blender Foundation\Blender\2.93\scripts\addons\blenderbim\libs\site\packages\ifcopenshell\file.py", line 99, in __getattr__
    return getattr(self.wrapped_data, attr)
  File "C:\Users\ryan\AppData\Roaming\Blender Foundation\Blender\2.93\scripts\addons\blenderbim\libs\site\packages\ifcopenshell\ifcopenshell_wrapper.py", line 1427, in <lambda>
    __getattr__ = lambda self, name: _swig_getattr(self, file, name)
  File "C:\Users\ryan\AppData\Roaming\Blender Foundation\Blender\2.93\scripts\addons\blenderbim\libs\site\packages\ifcopenshell\ifcopenshell_wrapper.py", line 80, in _swig_getattr
    raise AttributeError("'%s' object has no attribute '%s'" % (class_type.__name__, name))
AttributeError: 'file' object has no attribute 'begin_transaction'

location: <unknown location>:-1
Moult commented 3 years ago

Yeah sorry for the miscommunication, the bot build refers to the IfcOpenBot build, not these github builds. For example, the latest build is here: https://github.com/IfcOpenBot/IfcOpenShell/commit/ca85927a510ae0cb4a8f8f390186f3f8f2487278#commitcomment-53618072 - however I can't bump it since it is missing Mac builds.

I'll just patch it in the build system for now so you don't need to keep on waiting.