You forgot to cast acc as string for the cases when it is NoneType,
acc
NoneType
"get_devices_from_class_object#" + class_to_find + "#" + acc
will throw a TypeError
TypeError
mentioned in issue #1 (closed)