title: Tried to convert 'n' to a tensor and failed. Error: None values not supported
body: <p>I've hit my depth with this one and can't seem to get this (what would seem) simple linear regression to work. I know the answer is probably staring me in the face, but I think I've been staring at this to long to see it :).</p>
  
  <p>Traceback:</p>
  
  <pre><code>Traceback (most recent call last):
    File "/usr/local/lib/python3.6/site-packages/tensorflow/python/framework/op_def_library.py", line 510, in _apply_op_helper
      preferred_dtype=default_dtype)
    File "/usr/local/lib/python3.6/site-packages/tensorflow/python/framework/ops.py", line 1022, in internal_convert_to_tensor
      ret = conversion_func(value, dtype=dtype, name=name, as_ref=as_ref)
    File "/usr/local/lib/python3.6/site-packages/tensorflow/python/framework/constant_op.py", line 233, in _constant_tensor_conversion_function
      return constant(v, dtype=dtype, name=name)
    File "/usr/local/lib/python3.6/site-packages/tensorflow/python/framework/constant_op.py", line 212, in constant
      value, dtype=dtype, shape=shape, verify_shape=verify_shape))
    File "/usr/local/lib/python3.6/site-packages/tensorflow/python/framework/tensor_util.py", line 401, in make_tensor_proto
      raise ValueError("None values not supported.")
  ValueError: None values not supported.
  
  During handling of the above exception, another exception occurred:
  
  Traceback (most recent call last):
    File "/usr/local/lib/python3.6/site-packages/tensorflow/python/framework/op_def_library.py", line 524, in _apply_op_helper
      values, as_ref=input_arg.is_ref).dtype.name
    File "/usr/local/lib/python3.6/site-packages/tensorflow/python/framework/ops.py", line 1022, in internal_convert_to_tensor
      ret = conversion_func(value, dtype=dtype, name=name, as_ref=as_ref)
    File "/usr/local/lib/python3.6/site-packages/tensorflow/python/framework/constant_op.py", line 233, in _constant_tensor_conversion_function
      return constant(v, dtype=dtype, name=name)
    File "/usr/local/lib/python3.6/site-packages/tensorflow/python/framework/constant_op.py", line 212, in constant
      value, dtype=dtype, shape=shape, verify_shape=verify_shape))
    File "/usr/local/lib/python3.6/site-packages/tensorflow/python/framework/tensor_util.py", line 401, in make_tensor_proto
      raise ValueError("None values not supported.")
  ValueError: None values not supported.
  
  During handling of the above exception, another exception occurred:
  
  Traceback (most recent call last):
    File "flights.py", line 143, in &lt;module&gt;
      regressor.train(input_fn=training_input_fn, steps=10000)
    File "/usr/local/lib/python3.6/site-packages/tensorflow/python/estimator/estimator.py", line 314, in train
      loss = self._train_model(input_fn, hooks, saving_listeners)
    File "/usr/local/lib/python3.6/site-packages/tensorflow/python/estimator/estimator.py", line 740, in _train_model
      input_fn, model_fn_lib.ModeKeys.TRAIN))
    File "/usr/local/lib/python3.6/site-packages/tensorflow/python/estimator/estimator.py", line 603, in _get_features_and_labels_from_input_fn
      result = self._call_input_fn(input_fn, mode)
    File "/usr/local/lib/python3.6/site-packages/tensorflow/python/estimator/estimator.py", line 694, in _call_input_fn
      return input_fn(**kwargs)
    File "/usr/local/lib/python3.6/site-packages/tensorflow/python/estimator/inputs/pandas_io.py", line 110, in input_fn
      features = queue.dequeue_many(batch_size)
    File "/usr/local/lib/python3.6/site-packages/tensorflow/python/ops/data_flow_ops.py", line 475, in dequeue_many
      self._queue_ref, n=n, component_types=self._dtypes, name=name)
    File "/usr/local/lib/python3.6/site-packages/tensorflow/python/ops/gen_data_flow_ops.py", line 2445, in _queue_dequeue_many_v2
      component_types=component_types, timeout_ms=timeout_ms, name=name)
    File "/usr/local/lib/python3.6/site-packages/tensorflow/python/framework/op_def_library.py", line 528, in _apply_op_helper
      (input_name, err))
  ValueError: Tried to convert 'n' to a tensor and failed. Error: None values not supported.
  </code></pre>
  
  <p>Code: <a href="https://pastebin.com/M9arSCQa" rel="nofollow noreferrer">https://pastebin.com/M9arSCQa</a></p>
  
  <p>Data file: <a href="https://storage.googleapis.com/stackquestion2/201701.csv" rel="nofollow noreferrer">https://storage.googleapis.com/stackquestion2/201701.csv</a> </p>
  
  <p><strong>UPDATE</strong>
  After applying some of the suggestions the error has changed, however, the error was something I ran into prio this post, which means I'm running around in circles :) </p>
  
  <p>Here's the complete error:</p>
  
  <pre><code>tensorflow.python.framework.errors_impl.OutOfRangeError: FIFOQueue '_0_enqueue_input/fifo_queue' is closed and has insufficient elements (requested 128, current size 0)
       [[Node: fifo_queue_DequeueUpTo = QueueDequeueUpToV2[component_types=[DT_INT64, DT_STRING, DT_STRING, DT_DOUBLE, DT_STRING, ..., DT_STRING, DT_STRING, DT_STRING, DT_FLOAT, DT_FLOAT], timeout_ms=-1, _device="/job:localhost/replica:0/task:0/device:CPU:0"](enqueue_input/fifo_queue, fifo_queue_DequeueUpTo/n)]]
  </code></pre>
  
  <p>Latest code: <a href="https://pastebin.com/TvCw0rVw" rel="nofollow noreferrer">https://pastebin.com/TvCw0rVw</a></p>