Skip to content

add_dictionary feils with Invalid DXF attribute "hande" for entity DICTIONARY #751

@gyanev

Description

@gyanev

Describe the bug

When calling add_dictionary for a new extension dictionaly of any graphical element:

pl = modelspace.add_polyline2d(polyline,  dxfattribs={'layer':line_layer})
xdict = pl.new_extension_dict()
adict = xdict.add_dictionary("adictname")

the following exception is trown:

  File "/home/yanev/projects/pd/pd-flow/.venv/lib/python3.8/site-packages/ezdxf/entities/xdict.py", line 191, in add_dictionary
    owner=dictionary.dxf.hande,
  File "/home/yanev/projects/pd/pd-flow/.venv/lib/python3.8/site-packages/ezdxf/entities/dxfns.py", line 134, in __getattr__
    raise const.DXFAttributeError(
ezdxf.lldxf.const.DXFAttributeError: Invalid DXF attribute "hande" for entity DICTIONARY

To Reproduce
Just call add_dictionary of extension dictionary.

Expected behavior
A dictionary object should be successfully created and returned.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions