Python Traceback on calling Icon Viewer #95323

Closed
opened 2022-01-30 06:28:55 +01:00 by yonghao lv · 14 comments

System Information
Operating system: Windows-10-10.0.22000-SP0 64 Bits
Graphics card: NVIDIA GeForce RTX 2080 SUPER/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 511.09

Blender Version
Broken: version: 3.1.0 Beta, branch: master, commit date: 2022-01-30 00:06, hash: blender/blender@2cf3ed13da
Worked: (newest version of Blender that worked as expected)

Short description of error
I am not sure if it is an api changes. If so, I think it has break something

return context.window_manager.invoke_props_dialog(

TypeError: WindowManager.invoke_props_dialog(): error with keyword argument "width" -  Function.width expected an int type, not float```

**Exact steps for others to reproduce the error**
- enable icon viewer
- call icon viewer

**System Information** Operating system: Windows-10-10.0.22000-SP0 64 Bits Graphics card: NVIDIA GeForce RTX 2080 SUPER/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 511.09 **Blender Version** Broken: version: 3.1.0 Beta, branch: master, commit date: 2022-01-30 00:06, hash: `blender/blender@2cf3ed13da` Worked: (newest version of Blender that worked as expected) **Short description of error** I am not sure if it is an api changes. If so, I think it has break something ``` File "F:\Games\steam\steamapps\common\Blender\3.1\scripts\addons\development_icon_get.py", line 476, in invoke ``` return context.window_manager.invoke_props_dialog( ``` TypeError: WindowManager.invoke_props_dialog(): error with keyword argument "width" - Function.width expected an int type, not float``` **Exact steps for others to reproduce the error** - enable icon viewer - call icon viewer
Author

Added subscriber: @1029910278

Added subscriber: @1029910278
Member

Changed status from 'Needs Triage' to: 'Confirmed'

Changed status from 'Needs Triage' to: 'Confirmed'
Pratik Borhade changed title from invoke_props_dialog prop 'width' no longer accept float type to Python Traceback on calling Icon Viewer 2022-01-31 08:41:55 +01:00
Pratik Borhade self-assigned this 2022-01-31 08:46:00 +01:00
Author

I don't think this is a python addon problem. I report this because many addons has raise this error report. The popup dialog has always accept a float value in 3.0 days before, now it turn to be an int. Is that a plan of 3.0? I don't see it note in a breaking changes

I don't think this is a python addon problem. I report this because many addons has raise this error report. The popup dialog has always accept a float value in 3.0 days before, now it turn to be an int. Is that a plan of 3.0? I don't see it note in a breaking changes
Member

Hi, for this particular add-on I fix by converting argument explicitly.

I report this because many addons has raise this error report.

Can you mention those add-ons?
I tested on previous blender versions and I suspect it occurred after the python 3.10 bump (perhaps that has not affected)

index e8901eca..a8f2f9a2 100644
    - a/development_icon_get.py
+++ b/development_icon_get.py
@@ -474,7 +474,7 @@ class IV_OT_icons_show(bpy.types.Operator):
       context.window.width - WIN_PADDING)

   return context.window_manager.invoke_props_dialog(
- self, width=self.width)
+            self, width=int(self.width))

 def draw_console_header(self, context):

if not prefs().show_header:```

Hi, for this particular add-on I fix by converting argument explicitly. > I report this because many addons has raise this error report. Can you mention those add-ons? I tested on previous blender versions and I suspect it occurred after the python 3.10 bump (perhaps that has not affected) ```diff --git a/development_icon_get.py b/development_icon_get.py index e8901eca..a8f2f9a2 100644 - a/development_icon_get.py +++ b/development_icon_get.py @@ -474,7 +474,7 @@ class IV_OT_icons_show(bpy.types.Operator): ``` context.window.width - WIN_PADDING) ``` ``` return context.window_manager.invoke_props_dialog( ``` - self, width=self.width) + self, width=int(self.width)) def draw_console_header(self, context): ``` if not prefs().show_header:```

Added subscriber: @paulgolter

Added subscriber: @paulgolter

Hey created a patch for that issue: [D14031](https://developer.blender.org/D14031)

Hey created a patch for that issue: [[D14031](https://archive.blender.org/developer/D14031)](https://developer.blender.org/D14031)
Pratik Borhade removed their assignment 2022-02-07 12:34:06 +01:00
Paul Golter was assigned by Pratik Borhade 2022-02-07 12:34:06 +01:00
Member

Added subscriber: @PratikPB2123

Added subscriber: @PratikPB2123
Member

Should get fixed before 3.1 release. So raising the priority.

Should get fixed before 3.1 release. So raising the priority.
Member

Added subscribers: @ideasman42, @EAW

Added subscribers: @ideasman42, @EAW
Member

In #95323#1299867, @1029910278 wrote:
I don't think this is a python addon problem. I report this because many addons has raise this error report. The popup dialog has always accept a float value in 3.0 days before, now it turn to be an int. Is that a plan of 3.0? I don't see it note in a breaking changes

@ideasman42 it appears that the release notes have no mention of Python getting upgraded. I think add-on developers would appreciate the heads up in order to make any necessary changes, as release is rapidly approaching.

> In #95323#1299867, @1029910278 wrote: > I don't think this is a python addon problem. I report this because many addons has raise this error report. The popup dialog has always accept a float value in 3.0 days before, now it turn to be an int. Is that a plan of 3.0? I don't see it note in a breaking changes @ideasman42 it appears that the release notes have no mention of Python getting upgraded. I think add-on developers would appreciate the heads up in order to make any necessary changes, as release is rapidly approaching.

This issue was referenced by bb62f10715

This issue was referenced by bb62f10715a871d7069d2b2c74b2efc97c3c350c

Changed status from 'Confirmed' to: 'Resolved'

Changed status from 'Confirmed' to: 'Resolved'

Added subscriber: @zwtechno

Added subscriber: @zwtechno

Hello, i have this problem with Mandelbulb in Blender 3.3 and i need help:(

Hello, i have this problem with Mandelbulb in Blender 3.3 and i need help:(
Sign in to join this conversation.
No Milestone
No project
No Assignees
7 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#95323
No description provided.