DXF import error #105316

Closed
opened 2024-05-08 06:44:31 +02:00 by Pratik Borhade · 5 comments
Member

System Information
Operating system: Windows-10-10.0.19041-SP0 64 Bits
Graphics card: NVIDIA GeForce RTX 3090/PCIe/SSE2 NVIDIA Corporation 4.6.0 NVIDIA 552.22

Blender Version
Broken: version: 4.2.0 Alpha, branch: main, commit date: 2024-05-07 20:15, hash: dfe060ea6fb5
Worked: (newest version of Blender that worked as expected)

Short description of error
import dxf file error

Python: Traceback (most recent call last):
  File "C:\Program Files\Blender Foundation\Blender 4.2\4.2\scripts\addons\io_import_dxf\__init__.py", line 573, in execute
    if collection.name not in scene.collection.children: scene.collection.children.link(collection)
                                                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
RuntimeError: 错误: 集合 'Scene Collection' 已在集合 'Scene Collection' 里

Exact steps for others to reproduce the error
If the active collection in the outline is Scene Collection(1), and the collection option in the import dialog is current(2), then the import will report this message.
.dxf File attached in blender/blender#121553

**System Information** Operating system: Windows-10-10.0.19041-SP0 64 Bits Graphics card: NVIDIA GeForce RTX 3090/PCIe/SSE2 NVIDIA Corporation 4.6.0 NVIDIA 552.22 **Blender Version** Broken: version: 4.2.0 Alpha, branch: main, commit date: 2024-05-07 20:15, hash: `dfe060ea6fb5` Worked: (newest version of Blender that worked as expected) **Short description of error** import dxf file error ``` Python: Traceback (most recent call last): File "C:\Program Files\Blender Foundation\Blender 4.2\4.2\scripts\addons\io_import_dxf\__init__.py", line 573, in execute if collection.name not in scene.collection.children: scene.collection.children.link(collection) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ RuntimeError: 错误: 集合 'Scene Collection' 已在集合 'Scene Collection' 里 ``` **Exact steps for others to reproduce the error** If the active collection in the outline is Scene Collection(1), and the collection option in the import dialog is current(2), then the import will report this message. .dxf File attached in https://projects.blender.org/blender/blender/issues/121553
Pratik Borhade added the
Type
Report
Status
Needs Triage
Priority
Normal
labels 2024-05-08 06:44:32 +02:00
Author
Member

@RedHaloStudio hi, does this happen when importing .dxf in specific .blend file? I'm not sure what your import presets are, can you share screenshot of that? From traceback, commit cc687a0c50 looks related

@RedHaloStudio hi, does this happen when importing .dxf in specific .blend file? I'm not sure what your import presets are, can you share screenshot of that? From traceback, commit cc687a0c50aa0cf6ab4cf59d63a5e00486457648 looks related
Pratik Borhade added
Status
Needs Information from User
and removed
Status
Needs Triage
labels 2024-05-08 06:47:13 +02:00

I found the reason.
If the collection actived in the outline is Scene Collection(1), and the collection option in the import dialog is current(2), then the import will report this message.

I found the reason. If the collection actived in the outline is `Scene Collection`(1), and the collection option in the import dialog is `current`(2), then the import will report this message.
Author
Member

Thanks, can confirm.
cc @NRGSille @RobLop

Thanks, can confirm. cc @NRGSille @RobLop
Contributor

Hi,

Quick fix :
if collection != scene.collection and collection.name not in scene.collection.children: scene.collection.children.link(collection)

Hi, Quick fix : `if collection != scene.collection and collection.name not in scene.collection.children: scene.collection.children.link(collection)`
Contributor

Fixed #105317

Fixed https://projects.blender.org/blender/blender-addons/pulls/105317
Blender Bot added
Status
Resolved
and removed
Status
Confirmed
labels 2024-05-08 12:56:13 +02:00
Sign in to join this conversation.
No Milestone
No project
No Assignees
3 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender-addons#105316
No description provided.