Short description of error
The identifier resulted from prop_search is prefixed by three spaces. For instance, if an object is named Cube and it was chosen using prop_search, the resulted identifier will be Cube with three spaces before the object's name.
Exact steps for others to reproduce the error
Execute the following script and select an object:
import bpy from bpy.props import StringProperty def printObjectName(self, context): print(repr(context.scene.objectName)) class BugPanel(bpy.types.Panel): bl_label = "Bug Panel" bl_idname = "bug" bl_space_type = 'PROPERTIES' bl_region_type = 'WINDOW' bl_context = "object" def draw(self, context): self.layout.prop_search(context.scene, "objectName", context.scene, "objects") bpy.types.Scene.objectName = StringProperty(update = printObjectName) bpy.utils.register_class(BugPanel)
Looking at the terminal or the info area, you will see that objectName is actually the name of the chosen object prefixed by three spaces.