Cant Import DXF file #95444

Closed
opened 2022-02-02 17:41:19 +01:00 by SABRI Salim · 17 comments

System Information
Operating system: Linux-5.15.15-76051515-generic-x86_64-with-glibc2.34 64 Bits
Graphics card: NVIDIA GeForce GTX 1080 Ti/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 470.86

Blender Version
Broken: version: 3.1.0 Beta, branch: master, commit date: 2022-01-31 23:00, hash: blender/blender@f420118335
Worked: 3.0.1

Short description of error
TypeError while import DXF file

Exact steps for others to reproduce the error

  • Import uploaded DXF file

Test File:
Plans.dxf
test.dxf

Python: Traceback (most recent call last):
  File "C:\Users\Pratik\Desktop\BlenderOSP\2019_lite_ninja\bin\3.2\scripts\addons\io_import_dxf\__init__.py", line 539, in execute
    read(self.report, self.filepath, merge_options, self.import_text, self.import_light, self.export_acis,
  File "C:\Users\Pratik\Desktop\BlenderOSP\2019_lite_ninja\bin\3.2\scripts\addons\io_import_dxf\__init__.py", line 119, in read
    errors = do.entities(os.path.basename(filename).replace(".dxf", ""), new_scene)
  File "C:\Users\Pratik\Desktop\BlenderOSP\2019_lite_ninja\bin\3.2\scripts\addons\io_import_dxf\dxfimport\do.py", line 1627, in entities
    self.combined_objects((en for en in self.dwg.modelspace() if is_.combined_entity(en)), scene)
  File "C:\Users\Pratik\Desktop\BlenderOSP\2019_lite_ninja\bin\3.2\scripts\addons\io_import_dxf\dxfimport\do.py", line 1531, in combined_objects
    o = self._call_object_types(TYPE, by_att, group, name, scene, False)
  File "C:\Users\Pratik\Desktop\BlenderOSP\2019_lite_ninja\bin\3.2\scripts\addons\io_import_dxf\dxfimport\do.py", line 1380, in _call_object_types
    o = type_func(entity, scene, name)
  File "C:\Users\Pratik\Desktop\BlenderOSP\2019_lite_ninja\bin\3.2\scripts\addons\io_import_dxf\dxfimport\do.py", line 1291, in object_curve
    typefunc(en, d)
  File "C:\Users\Pratik\Desktop\BlenderOSP\2019_lite_ninja\bin\3.2\scripts\addons\io_import_dxf\dxfimport\do.py", line 378, in arc
    self._cubic_bezier_open(spline, curve)
  File "C:\Users\Pratik\Desktop\BlenderOSP\2019_lite_ninja\bin\3.2\scripts\addons\io_import_dxf\dxfimport\do.py", line 210, in _cubic_bezier_open
    b.add(count - 1)
TypeError: SplineBezierPoints.add(): error with argument 1, "count" -  Function.count expected an int type, not float

location: <unknown location>:-1

**System Information** Operating system: Linux-5.15.15-76051515-generic-x86_64-with-glibc2.34 64 Bits Graphics card: NVIDIA GeForce GTX 1080 Ti/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 470.86 **Blender Version** Broken: version: 3.1.0 Beta, branch: master, commit date: 2022-01-31 23:00, hash: `blender/blender@f420118335` Worked: 3.0.1 **Short description of error** TypeError while import DXF file **Exact steps for others to reproduce the error** - Import uploaded DXF file Test File: [Plans.dxf](https://archive.blender.org/developer/F12851321/Plans.dxf) [test.dxf](https://archive.blender.org/developer/F12875422/test.dxf) ```lines=10 Python: Traceback (most recent call last): File "C:\Users\Pratik\Desktop\BlenderOSP\2019_lite_ninja\bin\3.2\scripts\addons\io_import_dxf\__init__.py", line 539, in execute read(self.report, self.filepath, merge_options, self.import_text, self.import_light, self.export_acis, File "C:\Users\Pratik\Desktop\BlenderOSP\2019_lite_ninja\bin\3.2\scripts\addons\io_import_dxf\__init__.py", line 119, in read errors = do.entities(os.path.basename(filename).replace(".dxf", ""), new_scene) File "C:\Users\Pratik\Desktop\BlenderOSP\2019_lite_ninja\bin\3.2\scripts\addons\io_import_dxf\dxfimport\do.py", line 1627, in entities self.combined_objects((en for en in self.dwg.modelspace() if is_.combined_entity(en)), scene) File "C:\Users\Pratik\Desktop\BlenderOSP\2019_lite_ninja\bin\3.2\scripts\addons\io_import_dxf\dxfimport\do.py", line 1531, in combined_objects o = self._call_object_types(TYPE, by_att, group, name, scene, False) File "C:\Users\Pratik\Desktop\BlenderOSP\2019_lite_ninja\bin\3.2\scripts\addons\io_import_dxf\dxfimport\do.py", line 1380, in _call_object_types o = type_func(entity, scene, name) File "C:\Users\Pratik\Desktop\BlenderOSP\2019_lite_ninja\bin\3.2\scripts\addons\io_import_dxf\dxfimport\do.py", line 1291, in object_curve typefunc(en, d) File "C:\Users\Pratik\Desktop\BlenderOSP\2019_lite_ninja\bin\3.2\scripts\addons\io_import_dxf\dxfimport\do.py", line 378, in arc self._cubic_bezier_open(spline, curve) File "C:\Users\Pratik\Desktop\BlenderOSP\2019_lite_ninja\bin\3.2\scripts\addons\io_import_dxf\dxfimport\do.py", line 210, in _cubic_bezier_open b.add(count - 1) TypeError: SplineBezierPoints.add(): error with argument 1, "count" - Function.count expected an int type, not float location: <unknown location>:-1 ```
Author

Added subscriber: @Dalkoom

Added subscriber: @Dalkoom

#95883 was marked as duplicate of this issue

#95883 was marked as duplicate of this issue
Member

Added subscriber: @PratikPB2123

Added subscriber: @PratikPB2123
Member

Changed status from 'Needs Triage' to: 'Needs User Info'

Changed status from 'Needs Triage' to: 'Needs User Info'
Member

Thanks for the report. Please provide .dxf file where problem occurs on importing.
I can not repro with this file test.dxf
Similar type conversion issue has been reported recently: #95323 (Python Traceback on calling Icon Viewer)

Thanks for the report. Please provide .dxf file where problem occurs on importing. I can not repro with this file [test.dxf](https://archive.blender.org/developer/F12842940/test.dxf) Similar type conversion issue has been reported recently: #95323 (Python Traceback on calling Icon Viewer)

Added subscriber: @nullpex

Added subscriber: @nullpex

FYI I've got the same result in Blender 3.1.0 Beta on a Mac Mini with Apple Silicon M1. Guessing that doesn't matter since it is a Python issue.
Attaching the file I used.
Plans.dxf

FYI I've got the same result in Blender 3.1.0 Beta on a Mac Mini with Apple Silicon M1. Guessing that doesn't matter since it is a Python issue. Attaching the file I used. [Plans.dxf](https://archive.blender.org/developer/F12851321/Plans.dxf)

This plan was generated by freeCAD btw.

This plan was generated by freeCAD btw.
Member

Changed status from 'Needs User Info' to: 'Confirmed'

Changed status from 'Needs User Info' to: 'Confirmed'
Member

Thanks for the file. I can confirm.

Thanks for the file. I can confirm.
Pratik Borhade self-assigned this 2022-02-07 12:33:46 +01:00
Member

Added subscriber: @stefanotoneatto

Added subscriber: @stefanotoneatto

This issue was referenced by 7476c1ac24

This issue was referenced by 7476c1ac248472c1442b3fb1cb3e0a79747e48f6

Changed status from 'Confirmed' to: 'Resolved'

Changed status from 'Confirmed' to: 'Resolved'
Author

The Problem is Not yet Resolved
You can test this file Drawing1.dxf

The Problem is Not yet Resolved You can test this file [Drawing1.dxf](https://archive.blender.org/developer/F12882378/Drawing1.dxf)
Member

@Dalkoom hi, I can import your provided file on current master
Please test again on daily builds: https://builder.blender.org/download/daily/

@Dalkoom hi, I can import your provided file on current master Please test again on daily builds: https://builder.blender.org/download/daily/
Author

I have tested the last build and I confirm the problem is solved
I am sorry

I have tested the last build and I confirm the problem is solved I am sorry
Member

No problem. Thanks for testing :)

No problem. Thanks for testing :)
Sign in to join this conversation.
No Milestone
No project
No Assignees
5 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#95444
No description provided.