title: 'Channel' object has no attribute 'unary_unary' error when calling prediction_service_pb2_grpc.PredictionServiceStub(channel)
body: <p>I am trying to create an inference app for my model (language classification), and I am getting an error <code>Channel</code> object has no attribute <code>unary_unary</code>. I can't find any information about this problem anywhere, therefore this post. I am quite new to python and tensorflow area, and I'm still learning.
  <strong>Error log looks like this (few last lines)</strong> </p>
  
  <pre><code>2019-07-30T12:34:12.24+0200 [APP/PROC/WEB/0] ERR   File "app.py", line 189, in do_inference
     2019-07-30T12:34:12.24+0200 [APP/PROC/WEB/0] ERR     stub = prediction_service_pb2_grpc.PredictionServiceStub(channel)
     2019-07-30T12:34:12.24+0200 [APP/PROC/WEB/0] ERR   File "/home/vcap/deps/0/python/lib/python3.6/site-packages/tensorflow_serving/apis/prediction_service_pb2_grpc.py", line 40, in __init__
     2019-07-30T12:34:12.24+0200 [APP/PROC/WEB/0] ERR     self.Classify = channel.unary_unary(
     2019-07-30T12:34:12.24+0200 [APP/PROC/WEB/0] ERR AttributeError: 'Channel' object has no attribute 'unary_unary'
  </code></pre>
  
  <p>I am using flask for creating web service that consumes the model.</p>
  
  <pre class="lang-py prettyprint-override"><code>@app.route('/LangDet', methods=['POST'])
  def do_inference():
      # get deployed model details
      token = get_access_token()
      model_name = request.path[1:]
      query_string = {"modelName": model_name}
      headers = {
          'Authorization': token
      }
      res = requests.get(deployment_url, headers=headers, params=query_string)
      model_info = json.loads(res.text)
      if int(model_info["count"]) &lt; 1:
          return Response('404 Not Found: Model ' + model_name + ' is unavailable.', status=404)
      else:
          latest_version = [0, 0]
          for index, model in enumerate(model_info["modelServers"]):
              if int(model["specs"]["models"][0]["modelVersion"]) &gt; latest_version[0]:
                  latest_version = [int(model["specs"]["models"][0]["modelVersion"]), index]
  
          model_host = model_info["modelServers"][latest_version[1]]["endpoints"][0]
          credentials = implementations.ssl_channel_credentials(root_certificates=bytes(model_host["caCrt"], 'ascii'))
          channel = implementations.secure_channel(str(model_host["host"]), int(model_host["port"]), credentials)
          stub = prediction_service_pb2_grpc.PredictionServiceStub(channel)
  </code></pre>
  
  <p>after declaring stub, app throws exception. What seems to be an issue here and what can I do to fix it?</p>