Error running part2 wide.py - Pandas CSV parser error
Opened this issue · 0 comments
Hi
I am having some issue on this line:
https://github.com/c0cky/TensorFlow-in-a-Nutshell/blob/master/part2/wide.py#L92-L93
Does Pandas read_csv function accept a TF object as parameter?
I already have tried python2 and python3.
TensorFlow version: 0.12.1
If I run this code it works fine:
print(repr(pd.read_csv( "./train.csv", skipinitialspace=True)))
Error message:
everton@ubuntu:/projetos/TensorFlow-in-a-Nutshell/part2$ python2 wide.py
Traceback (most recent call last):
File "wide.py", line 114, in
tf.app.run()
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/platform/app.py", line 43, in run
sys.exit(main(sys.argv[:1] + flags_passthrough))
File "wide.py", line 110, in main
train_and_eval()
File "wide.py", line 94, in train_and_eval
skipinitialspace=True)
File "/usr/local/lib/python2.7/dist-packages/pandas/io/parsers.py", line 646, in parser_f
return _read(filepath_or_buffer, kwds)
File "/usr/local/lib/python2.7/dist-packages/pandas/io/parsers.py", line 389, in _read
parser = TextFileReader(filepath_or_buffer, **kwds)
File "/usr/local/lib/python2.7/dist-packages/pandas/io/parsers.py", line 730, in init
self._make_engine(self.engine)
File "/usr/local/lib/python2.7/dist-packages/pandas/io/parsers.py", line 923, in _make_engine
self._engine = CParserWrapper(self.f, **self.options)
File "/usr/local/lib/python2.7/dist-packages/pandas/io/parsers.py", line 1390, in init
self._reader = _parser.TextReader(src, **kwds)
File "pandas/parser.pyx", line 535, in pandas.parser.TextReader.cinit (pandas/parser.c:6086)
File "pandas/parser.pyx", line 710, in pandas.parser.TextReader._get_header (pandas/parser.c:8843)
File "pandas/parser.pyx", line 911, in pandas.parser.TextReader._tokenize_rows (pandas/parser.c:11308)
File "pandas/parser.pyx", line 2014, in pandas.parser.raise_parser_error (pandas/parser.c:26862)
tensorflow.python.framework.errors_impl.OutOfRangeError: reached end of file