Page MenuHome

pyrna_enum_to_py complains when iterate area.regions
Closed, ResolvedPublic

Description

System Information
Operating system: linux mint 19
Graphics card: nvidia 1070

Blender Version
Broken: 2.8

Short description of error
pyrna_enum_to_py complains when iterate area.regions in Layout workspace

Exact steps for others to reproduce the error

from bpy.types import Operator
from bpy.utils import register_class

class TEST_OP_pyrna_enum(Operator):
    bl_idname = "test.pyrna_enum"
    bl_label = "Test pyrna enum"
    def execute(self, context):
        for window in context.window_manager.windows:
            screen = window.screen
            for area in screen.areas:
                print("area:", area.type)
                for region in area.regions:
                    print("   region:", region.type)
        return {'FINISHED'}

register_class(TEST_OP_pyrna_enum)

Open blender, run the script, ensure you are in "layout" workspace,
Find the operator under search box, "Test pyrna enum"
take a look at console.

The error doesn't occur in script workspace.

area: VIEW_3D

region: HEADER
region: TOOLS
region: UI

WARN (bpy.rna): /blender-28-git/blender/source/blender/python/intern/bpy_rna.c:1412 pyrna_enum_to_py: current value '8' matches no enum in 'Region', '(null)', 'type'

region: 
region: WINDOW