lvgl / lv_binding_micropython

LVGL binding for MicroPython
MIT License
237 stars 157 forks source link

Error on typedef of enum #115

Closed amirgon closed 3 years ago

amirgon commented 3 years ago

When trying to include "esp_http_server.h" in espidf.h, the binding scripts stops with an error:

ESPIDFMOD-GEN build-GENERIC_SPIRAM/espidfmod/mp_espidf.c
Traceback (most recent call last):
  File "../../lib/lv_bindings/gen/gen_mpy.py", line 1205, in <module>
    member_names = [member.name for member in enum_def.type.values.enumerators if not member.name.startswith('_')]
AttributeError: 'NoneType' object has no attribute 'enumerators'

The may be related to typedef of enum:

typedef enum http_method httpd_method_t;

See details on https://forum.lvgl.io/t/adding-esp-http-server-h-to-the-generator/4369