diff --git a/src/ezdxf/sections/blocks.py b/src/ezdxf/sections/blocks.py index f9400f9ca..38cb3b70c 100644 --- a/src/ezdxf/sections/blocks.py +++ b/src/ezdxf/sections/blocks.py @@ -19,6 +19,7 @@ DXFKeyError, DXFStructureError, DXFTableEntryError, + DXFTypeError, ) from ezdxf.entities import ( Attrib, @@ -128,7 +129,10 @@ def load_block_record( "BlockRecord", block_records.new(block.dxf.name, dxfattribs={"scale": 0}), ) - + except DXFTypeError: + raise DXFStructureError( + f"Invalid or missing name of BLOCK #{block.dxf.handle}" + ) # The BLOCK_RECORD is the central object which stores all the # information about a BLOCK and also owns all the entities of # this block definition.