Maniphest T97025

bmesh.from_object() - SystemError: More keyword list entries (5) than format specifiers (4)
Closed, ResolvedBUG

Assigned To
Hans Goudey (HooglyBoogly)
Authored By
Jakub Uhlik (carbon14)
Apr 4 2022, 11:15 AM
Tags
  • BF Blender
  • Python API
Subscribers
Andrew Louie (louiea)
Jakub Uhlik (carbon14)
lucas veber (lucky3)

Description

System Information
Operating system: macOS-10.13.6-x86_64-i386-64bit 64 Bits

Blender Version
Broken: version: 3.2.0 Alpha, branch: master, commit date: 2022-04-03 17:57, hash: rB637fe6f5ff9c
Worked: 3.2 from 2-3 weeks ago? something like that

Short description of error
SystemError: More keyword list entries (5) than format specifiers (4)

Exact steps for others to reproduce the error
add cube, have it selected and active, run script

import bpy
import bmesh

c = bpy.context
o = c.active_object
depsgraph = c.evaluated_depsgraph_get()
eo = o.evaluated_get(depsgraph)
bm = bmesh.new()
bm.from_object(eo, depsgraph, cage=False, face_normals=True)

output

Traceback (most recent call last):
  File "/Text", line 9, in <module>
SystemError: More keyword list entries (5) than format specifiers (4)
Error: Python script failed, check the message in the system console

Revisions and Commits

rB Blender

Event Timeline

Jakub Uhlik (carbon14) created this task.Apr 4 2022, 11:15 AM
Jakub Uhlik (carbon14) added a project: Python API.
Omar Emara (OmarSquircleArt) changed the task status from Needs Triage to Confirmed.Apr 4 2022, 11:48 AM
Andrew Louie (louiea) added a subscriber: Andrew Louie (louiea).Apr 11 2022, 4:35 PM

I get this error with version 3.1.2. I think the error was introduced with Fix T96308, a new argument "vertex_normals" was added to source/blender/python/bmesh/bmesh_py_types.c

I think vertex_normals was added without a type arguement.

static PyObject *bpy_bmesh_from_object(BPy_BMesh *self, PyObject *args, PyObject *kw)
{
  static const char *kwlist[] = {
      "object", "depsgraph", "cage", "face_normals", "vertex_normals", NULL};
Hans Goudey (HooglyBoogly) closed this task as Resolved by committing rB77db370cb6e0: Fix: BMesh Python API errors after vertex_normals addition.Apr 12 2022, 6:09 PM
Hans Goudey (HooglyBoogly) claimed this task.
Hans Goudey (HooglyBoogly) added a commit: rB77db370cb6e0: Fix: BMesh Python API errors after vertex_normals addition.
Hans Goudey (HooglyBoogly) triaged this task as High priority.Apr 12 2022, 6:12 PM
Hans Goudey (HooglyBoogly) changed the subtype of this task from "Report" to "Bug".
lucas veber (lucky3) added a subscriber: lucas veber (lucky3).EditedApr 25 2022, 3:26 PM

@Hans Goudey (HooglyBoogly) Thanks for the fix, is there any chance to commit this patch to Blender 3.1.2/ 3.1.3 as well?

Hans Goudey (HooglyBoogly) added a comment.Apr 25 2022, 3:31 PM

Unfortunately I don't think there is another release planned for 3.1, sorry about that.

lucas veber (lucky3) added a comment.Apr 25 2022, 4:00 PM

Ok thanks anyway.