title: TypeError: expected bytes, Descriptor found
body: <p>How do I fix the following error traceback regarding <code>tf.record</code>?</p>
  
  <pre class="lang-py prettyprint-override"><code>(tensorflow1) c:\tensorflow1\models\research\object_detection&gt;python generate_tfrecord.py --csv_input=data/train_labels.csv --output_path=data/train.record --image_dir=(image directory)
  Traceback (most recent call last):
    File "generate_tfrecord.py", line 17, in &lt;module&gt;
      import tensorflow as tf
    File "C:\Users\Dell-Oguz\Anaconda3\envs\tensorflow1\lib\site-packages\tensorflow\__init__.py", line 24, in &lt;module&gt;
      from tensorflow.python import pywrap_tensorflow  # pylint: disable=unused-import
    File "C:\Users\Dell-Oguz\Anaconda3\envs\tensorflow1\lib\site-packages\tensorflow\python\__init__.py", line 52, in &lt;module&gt;
      from tensorflow.core.framework.graph_pb2 import *
    File "C:\Users\Dell-Oguz\Anaconda3\envs\tensorflow1\lib\site-packages\tensorflow\core\framework\graph_pb2.py", line 15, in &lt;module&gt;
      from tensorflow.core.framework import node_def_pb2 as tensorflow_dot_core_dot_framework_dot_node__def__pb2
    File "C:\Users\Dell-Oguz\Anaconda3\envs\tensorflow1\lib\site-packages\tensorflow\core\framework\node_def_pb2.py", line 15, in &lt;module&gt;
      from tensorflow.core.framework import attr_value_pb2 as tensorflow_dot_core_dot_framework_dot_attr__value__pb2
    File "C:\Users\Dell-Oguz\Anaconda3\envs\tensorflow1\lib\site-packages\tensorflow\core\framework\attr_value_pb2.py", line 15, in &lt;module&gt;
      from tensorflow.core.framework import tensor_pb2 as tensorflow_dot_core_dot_framework_dot_tensor__pb2
    File "C:\Users\Dell-Oguz\Anaconda3\envs\tensorflow1\lib\site-packages\tensorflow\core\framework\tensor_pb2.py", line 15, in &lt;module&gt;
      from tensorflow.core.framework import resource_handle_pb2 as tensorflow_dot_core_dot_framework_dot_resource__handle__pb2
    File "C:\Users\Dell-Oguz\Anaconda3\envs\tensorflow1\lib\site-packages\tensorflow\core\framework\resource_handle_pb2.py", line 91, in &lt;module&gt;
      __module__ = 'tensorflow.core.framework.resource_handle_pb2'
  TypeError: expected bytes, Descriptor found
  </code></pre>