nutti / fake-bpy-module

Fake Blender Python API module collection for the code completion.
MIT License
1.41k stars 97 forks source link

IndexError: tuple index out of range #4

Closed ekkl closed 5 years ago

ekkl commented 6 years ago

By generation I get error

]$ blender --background --factory-startup -noaudio --python doc/python_api/sphinx_doc_gen.py Traceback (most recent call last): File "/home/ekkl/shared/bpy-fake/blender/release/scripts/modules/bpy/utils/init.py", line 94, in _test_import mod = import(module_name) File "/home/ekkl/shared/bpy-fake/blender/release/scripts/startup/nodeitems_builtins.py", line 162, in NodeItem("NodeGroupInput", poll=group_input_output_item_poll), File "/home/ekkl/shared/bpy-fake/blender/release/scripts/startup/nodeitems_builtins.py", line 35, in init items = sorted(items, key=lambda item: item.label.lower()) File "/home/ekkl/shared/bpy-fake/blender/release/scripts/startup/nodeitems_builtins.py", line 35, in items = sorted(items, key=lambda item: item.label.lower()) File "/home/ekkl/shared/bpy-fake/blender/release/scripts/modules/nodeitems_utils.py", line 62, in label bl_rna = bpy.types.Node.bl_rna_get_subclass(self.nodetype) AttributeError: type object 'Node' has no attribute 'bl_rna_get_subclass' Traceback (most recent call last): File "/home/ekkl/shared/bpy-fake/blender/release/scripts/modules/addon_utils.py", line 340, in enable mod = import(module_name) ModuleNotFoundError: No module named 'io_scene_3ds' Traceback (most recent call last): File "/home/ekkl/shared/bpy-fake/blender/release/scripts/modules/addon_utils.py", line 340, in enable mod = import(module_name) ModuleNotFoundError: No module named 'io_scene_fbx' Traceback (most recent call last): File "/home/ekkl/shared/bpy-fake/blender/release/scripts/modules/addon_utils.py", line 340, in enable mod = import(module_name) ModuleNotFoundError: No module named 'io_anim_bvh' Traceback (most recent call last): File "/home/ekkl/shared/bpy-fake/blender/release/scripts/modules/addon_utils.py", line 340, in enable mod = import(module_name) ModuleNotFoundError: No module named 'io_mesh_ply' Traceback (most recent call last): File "/home/ekkl/shared/bpy-fake/blender/release/scripts/modules/addon_utils.py", line 340, in enable mod = import(module_name) ModuleNotFoundError: No module named 'io_scene_obj' Traceback (most recent call last): File "/home/ekkl/shared/bpy-fake/blender/release/scripts/modules/addon_utils.py", line 340, in enable mod = import(module_name) ModuleNotFoundError: No module named 'io_scene_x3d' Traceback (most recent call last): File "/home/ekkl/shared/bpy-fake/blender/release/scripts/modules/addon_utils.py", line 340, in enable mod = import(module_name) ModuleNotFoundError: No module named 'io_mesh_stl' Traceback (most recent call last): File "/home/ekkl/shared/bpy-fake/blender/release/scripts/modules/addon_utils.py", line 340, in enable mod = import(module_name) ModuleNotFoundError: No module named 'io_mesh_uv_layout' Traceback (most recent call last): File "/home/ekkl/shared/bpy-fake/blender/release/scripts/modules/addon_utils.py", line 340, in enable mod = import(module_name) ModuleNotFoundError: No module named 'io_curve_svg' Traceback (most recent call last): File "/home/ekkl/shared/bpy-fake/blender/release/scripts/modules/addon_utils.py", line 340, in enable mod = import(module_name) ModuleNotFoundError: No module named 'cycles' /home/ekkl/shared/bpy-fake/blender/doc/python_api/rst/bmesh.ops.rst Traceback (most recent call last): File "/home/ekkl/shared/bpy-fake/blender/doc/python_api/sphinx_doc_gen.py", line 2226, in main() File "/home/ekkl/shared/bpy-fake/blender/doc/python_api/sphinx_doc_gen.py", line 2148, in main rna2sphinx(SPHINX_IN_TMP) File "/home/ekkl/shared/bpy-fake/blender/doc/python_api/sphinx_doc_gen.py", line 2021, in rna2sphinx pycontext2sphinx(basepath) File "/home/ekkl/shared/bpy-fake/blender/doc/python_api/sphinx_doc_gen.py", line 1158, in pycontext2sphinx write_contex_cls() File "/home/ekkl/shared/bpy-fake/blender/doc/python_api/sphinx_doc_gen.py", line 1127, in write_contex_cls structs, funcs, ops, props = rna_info_BuildRNAInfo_cache() File "/home/ekkl/shared/bpy-fake/blender/doc/python_api/sphinx_doc_gen.py", line 74, in rna_info_BuildRNAInfo_cache rna_info_BuildRNAInfo_cache.ret = rna_info.BuildRNAInfo() File "/home/ekkl/shared/bpy-fake/blender/release/scripts/modules/rna_info.py", line 702, in BuildRNAInfo prop.build() File "/home/ekkl/shared/bpy-fake/blender/release/scripts/modules/rna_info.py", line 290, in build if self.array_dimensions[1] != 0: # Multi-dimensional array, convert default flat one accordingly. IndexError: tuple index out of range Blender quit

And output dir is empty. How can fix it?

nutti commented 6 years ago

What blender version did you use?

ekkl commented 6 years ago

Hi, at once I apologize for English, if not everything is clear - this is not my language. I used several versions of Blender, they all gave similar errors, but not the same. The versions are as follows: 2.79 from the Fedora repository, 2.79, 2.77 from Official site

2.79 from Repository

]$ blender --background --factory-startup -noaudio --python doc/python_api/sphinx_doc_gen.py
Traceback (most recent call last):
  File "/home/ekkl/shared/bpy-fake/blender/release/scripts/modules/bpy/utils/__init__.py", line 94, in _test_import
    mod = __import__(module_name)
  File "/home/ekkl/shared/bpy-fake/blender/release/scripts/startup/nodeitems_builtins.py", line 162, in <module>
    NodeItem("NodeGroupInput", poll=group_input_output_item_poll),
  File "/home/ekkl/shared/bpy-fake/blender/release/scripts/startup/nodeitems_builtins.py", line 35, in __init__
    items = sorted(items, key=lambda item: item.label.lower())
  File "/home/ekkl/shared/bpy-fake/blender/release/scripts/startup/nodeitems_builtins.py", line 35, in <lambda>
    items = sorted(items, key=lambda item: item.label.lower())
  File "/home/ekkl/shared/bpy-fake/blender/release/scripts/modules/nodeitems_utils.py", line 62, in label
    bl_rna = bpy.types.Node.bl_rna_get_subclass(self.nodetype)
AttributeError: type object 'Node' has no attribute 'bl_rna_get_subclass'
Traceback (most recent call last):
  File "/home/ekkl/shared/bpy-fake/blender/release/scripts/modules/addon_utils.py", line 340, in enable
    mod = __import__(module_name)
ModuleNotFoundError: No module named 'io_scene_3ds'
Traceback (most recent call last):
  File "/home/ekkl/shared/bpy-fake/blender/release/scripts/modules/addon_utils.py", line 340, in enable
    mod = __import__(module_name)
ModuleNotFoundError: No module named 'io_scene_fbx'
Traceback (most recent call last):
  File "/home/ekkl/shared/bpy-fake/blender/release/scripts/modules/addon_utils.py", line 340, in enable
    mod = __import__(module_name)
ModuleNotFoundError: No module named 'io_anim_bvh'
Traceback (most recent call last):
  File "/home/ekkl/shared/bpy-fake/blender/release/scripts/modules/addon_utils.py", line 340, in enable
    mod = __import__(module_name)
ModuleNotFoundError: No module named 'io_mesh_ply'
Traceback (most recent call last):
  File "/home/ekkl/shared/bpy-fake/blender/release/scripts/modules/addon_utils.py", line 340, in enable
    mod = __import__(module_name)
ModuleNotFoundError: No module named 'io_scene_obj'
Traceback (most recent call last):
  File "/home/ekkl/shared/bpy-fake/blender/release/scripts/modules/addon_utils.py", line 340, in enable
    mod = __import__(module_name)
ModuleNotFoundError: No module named 'io_scene_x3d'
Traceback (most recent call last):
  File "/home/ekkl/shared/bpy-fake/blender/release/scripts/modules/addon_utils.py", line 340, in enable
    mod = __import__(module_name)
ModuleNotFoundError: No module named 'io_mesh_stl'
Traceback (most recent call last):
  File "/home/ekkl/shared/bpy-fake/blender/release/scripts/modules/addon_utils.py", line 340, in enable
    mod = __import__(module_name)
ModuleNotFoundError: No module named 'io_mesh_uv_layout'
Traceback (most recent call last):
  File "/home/ekkl/shared/bpy-fake/blender/release/scripts/modules/addon_utils.py", line 340, in enable
    mod = __import__(module_name)
ModuleNotFoundError: No module named 'io_curve_svg'
Traceback (most recent call last):
  File "/home/ekkl/shared/bpy-fake/blender/release/scripts/modules/addon_utils.py", line 340, in enable
    mod = __import__(module_name)
ModuleNotFoundError: No module named 'cycles'
/home/ekkl/shared/bpy-fake/blender/doc/python_api/rst/bmesh.ops.rst
Traceback (most recent call last):
  File "/home/ekkl/shared/bpy-fake/blender/doc/python_api/sphinx_doc_gen.py", line 2226, in <module>
    main()
  File "/home/ekkl/shared/bpy-fake/blender/doc/python_api/sphinx_doc_gen.py", line 2148, in main
    rna2sphinx(SPHINX_IN_TMP)
  File "/home/ekkl/shared/bpy-fake/blender/doc/python_api/sphinx_doc_gen.py", line 2021, in rna2sphinx
    pycontext2sphinx(basepath)
  File "/home/ekkl/shared/bpy-fake/blender/doc/python_api/sphinx_doc_gen.py", line 1158, in pycontext2sphinx
    write_contex_cls()
  File "/home/ekkl/shared/bpy-fake/blender/doc/python_api/sphinx_doc_gen.py", line 1127, in write_contex_cls
    structs, funcs, ops, props = rna_info_BuildRNAInfo_cache()
  File "/home/ekkl/shared/bpy-fake/blender/doc/python_api/sphinx_doc_gen.py", line 74, in rna_info_BuildRNAInfo_cache
    rna_info_BuildRNAInfo_cache.ret = rna_info.BuildRNAInfo()
  File "/home/ekkl/shared/bpy-fake/blender/release/scripts/modules/rna_info.py", line 702, in BuildRNAInfo
    prop.build()
  File "/home/ekkl/shared/bpy-fake/blender/release/scripts/modules/rna_info.py", line 290, in build
    if self.array_dimensions[1] != 0:  # Multi-dimensional array, convert default flat one accordingly.
IndexError: tuple index out of range

Blender quit

That the message was not too long, for other versions I put out a conclusion on a hosting of a code

Blender 2.79 from Official site https://paste.fedoraproject.org/paste/0qGRD76nvy0JDetHLhiccw Blender 2.77 from Official sile https://paste.fedoraproject.org/paste/8RSDa7BRMcDRSKRGdjK1Xw

Also, I try create fake module with this https://github.com/mutantbob/pycharm-blender, but I have get similar error too.

nutti commented 6 years ago

Thanks, I will check it.

BTW, I would like to tell you that you can use pre-generated module https://github.com/nutti/fake-bpy-module/tree/master/modules/2.79 if you only try to use fake module.

nutti commented 6 years ago

I think this problem is not related my script.

$ blender --background --factory-startup -noaudio --python doc/python_api/sphinx_doc_gen.py

This command does not use my script. It uses only Blender itself. I doubt that your Blender version and its source version does not match correctly.

ekkl commented 6 years ago

Thank you. Viewing of the pre-generated modules showed that they do not contain classes (only function/procedures). Also no documentation/description on function. So it should be? Autocomplete in Komodo edit does not work?

nutti commented 6 years ago

There is no documentation for any editor in fake bpy module now. I think it is useful for some editor by adding a documentation.

nutti commented 5 years ago

I created the documentation for installing this module into all text editor. So, I close it now.