@@ -206,7 +206,8 @@ def track_objects_gcs(gcs_uri):
206206
207207 # Get only the first annotation for demo purposes.
208208 object_annotation = object_annotations [0 ]
209- print ('Entity description: {}' .format (
209+ # description is in Unicode
210+ print (u'Entity description: {}' .format (
210211 object_annotation .entity .description ))
211212 if object_annotation .entity .entity_id :
212213 print ('Entity id: {}' .format (object_annotation .entity .entity_id ))
@@ -259,7 +260,8 @@ def track_objects(path):
259260
260261 # Get only the first annotation for demo purposes.
261262 object_annotation = object_annotations [0 ]
262- print ('Entity description: {}' .format (
263+ # description is in Unicode
264+ print (u'Entity description: {}' .format (
263265 object_annotation .entity .description ))
264266 if object_annotation .entity .entity_id :
265267 print ('Entity id: {}' .format (object_annotation .entity .entity_id ))
@@ -343,7 +345,8 @@ def stream_generator():
343345 description = annotation .entity .description
344346 # Every annotation has only one frame
345347 confidence = annotation .frames [0 ].confidence
346- print ('\t {} (confidence: {})' .format (description , confidence ))
348+ # description is in Unicode
349+ print (u'\t {} (confidence: {})' .format (description , confidence ))
347350 # [END video_streaming_label_detection_beta]
348351
349352
@@ -463,7 +466,8 @@ def stream_generator():
463466 # track_id tracks the same object in the video.
464467 track_id = annotation .track_id
465468
466- print ('\t Entity description: {}' .format (description ))
469+ # description is in Unicode
470+ print (u'\t Entity description: {}' .format (description ))
467471 print ('\t Track Id: {}' .format (track_id ))
468472 if annotation .entity .entity_id :
469473 print ('\t Entity id: {}' .format (annotation .entity .entity_id ))
0 commit comments