This happens when the collection's item type doesn't have a 'nameproperty' to index with. For debug builds we error out with an assert, since in general this shouldn't happen. For release builds Python will report item not found. Pull Request: blender/blender#107086