You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ERROR: ERROR: /home/seetea/tensorflow-serving-latest/tensorflow_serving/session_bundle/example/BUILD:34:1: Executing genrule //tensorflow_serving/session_bundle/example:half_plus_two failed: bash failed: error executing command /bin/bash -c ... (remaining 1 argument(s) skipped): com.google.devtools.build.lib.shell.BadExitStatusException: Process exited with status 1. File "/home/seetea/.cache/bazel/_bazel_seetea/8d38ebe87742a96afdc093845beacfa5/tensorflow-serving-latest/bazel-out/host/bin/tensorflow_serving/session_bundle/example/export_half_plus_two.runfiles/tensorflow_serving/session_bundle/example/export_half_plus_two.py", line 66 print "copying asset files to: %s" % export_path ^ SyntaxError: Missing parentheses in call to 'print'
Environment: CentOS 7 + Python 3.4
Description: When I use "bazel build tensorflow_serving/..." to build the tensorflow_serving source codes under python 3.4, I met the above error.
Solution:
I made the following modifications to make the codes work for both python 2.x and python 3.x:
In "serving/tensorflow_serving/session_bundle/example/export_half_plus_two.py", add from __future__ import print_function
and change print "copying asset files to: %s" % export_path
to print ("copying asset files to: %s" % export_path)
In "serving/tensorflow_serving/session_bundle/exporter.py",
import six
.....
#for name, tensor in name_tensor_map.iteritems():
for name, tensor in six.iteritems(name_tensor_map):
......
#for signature_name, signature in named_graph_signatures.iteritems():
for signature_name, signature in six.iteritems(named_graph_signatures):
.......
The text was updated successfully, but these errors were encountered:
ERROR:
ERROR: /home/seetea/tensorflow-serving-latest/tensorflow_serving/session_bundle/example/BUILD:34:1: Executing genrule //tensorflow_serving/session_bundle/example:half_plus_two failed: bash failed: error executing command /bin/bash -c ... (remaining 1 argument(s) skipped): com.google.devtools.build.lib.shell.BadExitStatusException: Process exited with status 1. File "/home/seetea/.cache/bazel/_bazel_seetea/8d38ebe87742a96afdc093845beacfa5/tensorflow-serving-latest/bazel-out/host/bin/tensorflow_serving/session_bundle/example/export_half_plus_two.runfiles/tensorflow_serving/session_bundle/example/export_half_plus_two.py", line 66 print "copying asset files to: %s" % export_path ^ SyntaxError: Missing parentheses in call to 'print'
Environment: CentOS 7 + Python 3.4
Description: When I use "bazel build tensorflow_serving/..." to build the tensorflow_serving source codes under python 3.4, I met the above error.
Solution:
I made the following modifications to make the codes work for both python 2.x and python 3.x:
from __future__ import print_function
and change
print "copying asset files to: %s" % export_path
to
print ("copying asset files to: %s" % export_path)
The text was updated successfully, but these errors were encountered: