Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Doesn't work on Arch Linux: IndexError: bpy_prop_collection[index]: index 3 out of range, size 3 #209

Open
juozasmiskinis opened this issue Apr 26, 2024 · 5 comments
Assignees

Comments

@juozasmiskinis
Copy link

Describe the bug
This error comes up when trying to display some object using GUI or Python.

Python: Traceback (most recent call last):
  File "/home/user/.config/blender/4.1/scripts/addons/batoms/ops/add_object.py", line 129, in execute
    batoms = Batoms(label=self.label, from_ase=atoms)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/user/.config/blender/4.1/scripts/addons/batoms/batoms.py", line 156, in __init__
    self._cell = Bcell(label, cell, batoms=self)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/user/.config/blender/4.1/scripts/addons/batoms/cell.py", line 28, in __init__
    self.build_object(array, location)
  File "/home/user/.config/blender/4.1/scripts/addons/batoms/cell.py", line 69, in build_object
    self.build_geometry_node()
  File "/home/user/.config/blender/4.1/scripts/addons/batoms/cell.py", line 100, in build_geometry_node
    links.new(PositionCell.outputs["Position"], TransferCell.inputs[3])
                                                ~~~~~~~~~~~~~~~~~~~^^^
IndexError: bpy_prop_collection[index]: index 3 out of range, size 3

To Reproduce
Steps to reproduce the behavior:

  1. Install on Arch Linux using the manual installation method.
  2. In Object mode, click Add -> Batoms -> Atoms. The error appears.

Alternatively, in the Python terminal:

  1. Define the H2O molecule as suggested in the Usage section:
from batoms import Batoms
h2o = Batoms("h2o",
            species = ["O", "H", "H"],
            positions= [[0, 0, 0], [0, -0.76, -0.6], [0, 0.76, -0.6]])
  1. The error appears after the attempt to define h2o.

Expected behavior
There should be no errors.

Desktop:
OS: Arch Linux 6.8.7-arch1-1

Blender Version
4.1.1

Additional context
AFAIK, there is no such thing as Blender’s bundled python location on Arch Linux, therefore I can't use install.py.

@liuyun88
Copy link

liuyun88 commented May 2, 2024

I can reproduce this error on Blender 4.1.1 on Windows 11

@superstar54
Copy link
Member

Hi @juozasmiskinis and @liuyun88 , thanks for reporting this issue. I can also reproduce this error. There seems an update of Python API in Blender 4.1.1. I will fix this issue asap.

@superstar54 superstar54 self-assigned this May 2, 2024
@superstar54
Copy link
Member

superstar54 commented May 2, 2024

Hi All, indeed, Blender 4.1 refactors the sockets of many nodes in this PR. I suggest you use Blender 4.0 for the moment.
I will update you when I fix this issue.

@juozasmiskinis
Copy link
Author

Thanks for the heads up!

@liuyun88
Copy link

liuyun88 commented May 31, 2024

Just wondering if this has been fixed. Using the blender4.1 branch still gives the following error

Traceback (most recent call last): File "<blender_console>", line 1, in <module> File "<string>", line 19, in <module> File "/usr/share/blender/4.1/scripts/addons/batoms/batoms.py", line 156, in __init__ self._cell = Bcell(label, cell, batoms=self) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/share/blender/4.1/scripts/addons/batoms/cell.py", line 28, in __init__ self.build_object(array, location) File "/usr/share/blender/4.1/scripts/addons/batoms/cell.py", line 69, in build_object self.build_geometry_node() File "/usr/share/blender/4.1/scripts/addons/batoms/cell.py", line 157, in build_geometry_node input_nodes[faces[i][j]].outputs["Value"], ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^ KeyError: 'bpy_prop_collection[key]: key "Value" not found'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants