TensorFlow-Summarization icon indicating copy to clipboard operation
TensorFlow-Summarization copied to clipboard

File not found error

Open Affanamin opened this issue 6 years ago • 14 comments

Following those instructions, I got an error of file not found. attachment is the screen shot of error. please help

capture

Affanamin avatar Feb 22 '18 07:02 Affanamin

Please follow README, rename files and put them into the correct directory.

leix28 avatar Feb 22 '18 14:02 leix28

Hi, I get the same error. I did follow your instructions and structured the files as per the readme but the error comes anyway.

You were calling subprocess.call() and that is causing the error. any help please.

harshadeepg avatar Feb 22 '18 17:02 harshadeepg

I'm not sure what happened. Can you show me the command you use and more error information?

The problem may also be caused by Windows which uses \ in path instead of /.

You should be able to train the model by python3 src/summarization.py.

leix28 avatar Feb 22 '18 17:02 leix28

I have used subprocess.call(proc, shell=True), this worked with the [WinError 2] part.

Now I am getting a new error:

Feb 23 00:18 data_util.py[line:178] INFO Load 1951 testing documents. Feb 23 00:18 data_util.py[line:183] INFO Doc dict covers 97.70% words. 2018-02-23 00:18:05.813587: I C:\tf_jenkins\home\workspace\rel-win\M\windows\PY\36\tensorflow\core\platform\cpu_feature_guard.cc:137] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX AVX2 Feb 23 00:18 summarization.py[line:195] INFO Creating 1 layers of 400 units. Traceback (most recent call last): File "src/summarization.py", line 241, in tf.app.run() File "C:\ProgramData\Anaconda3\lib\site-packages\tensorflow\python\platform\app.py", line 48, in run _sys.exit(main(_sys.argv[:1] + flags_passthrough)) File "src/summarization.py", line 229, in main decode() File "src/summarization.py", line 196, in decode model = create_model(sess, True) File "src/summarization.py", line 75, in create_model dtype=dtype) File "C:\Harsha\Text Summarization\TensorFlow-Summarization-master\src\bigru_model.py", line 152, in init tf.contrib.seq2seq.dynamic_decode(decoder) File "C:\ProgramData\Anaconda3\lib\site-packages\tensorflow\contrib\seq2seq\python\ops\decoder.py", line 286, in dynamic_decode swap_memory=swap_memory) File "C:\ProgramData\Anaconda3\lib\site-packages\tensorflow\python\ops\control_flow_ops.py", line 2816, in while_loop result = loop_context.BuildLoop(cond, body, loop_vars, shape_invariants) File "C:\ProgramData\Anaconda3\lib\site-packages\tensorflow\python\ops\control_flow_ops.py", line 2640, in BuildLoop pred, body, original_loop_vars, loop_vars, shape_invariants) File "C:\ProgramData\Anaconda3\lib\site-packages\tensorflow\python\ops\control_flow_ops.py", line 2531, in _BuildLoop self._InitializeValues(loop_vars) File "C:\ProgramData\Anaconda3\lib\site-packages\tensorflow\python\ops\control_flow_ops.py", line 2513, in _InitializeValues self._values.add(x.values.name) AttributeError: 'NoneType' object has no attribute 'values'

harshadeepg avatar Feb 22 '18 18:02 harshadeepg

I think the problem is the backward slash on Windows against forward slash on Unix like systems.

You may try the code on a Linux machine (or a virtual machine).

leix28 avatar Feb 22 '18 21:02 leix28

@leix28 I have already done that. image

But I am still having above mentioned errors.

Affanamin avatar Feb 23 '18 05:02 Affanamin

@harshadeepg please elaborate about how you solve this error. I mean should I have to paste subprocess.call(proc, shell=True), in subprocess.py file ?

Affanamin avatar Feb 23 '18 05:02 Affanamin

make python where there in python3 in script/train.py Hope it works

vjstha20 avatar Aug 14 '18 06:08 vjstha20

I have used subprocess.call(proc, shell=True), this worked with the [WinError 2] part.

Now I am getting a new error:

Feb 23 00:18 data_util.py[line:178] INFO Load 1951 testing documents. Feb 23 00:18 data_util.py[line:183] INFO Doc dict covers 97.70% words. 2018-02-23 00:18:05.813587: I C:\tf_jenkins\home\workspace\rel-win\M\windows\PY\36\tensorflow\core\platform\cpu_feature_guard.cc:137] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX AVX2 Feb 23 00:18 summarization.py[line:195] INFO Creating 1 layers of 400 units. Traceback (most recent call last): File "src/summarization.py", line 241, in tf.app.run() File "C:\ProgramData\Anaconda3\lib\site-packages\tensorflow\python\platform\app.py", line 48, in run _sys.exit(main(_sys.argv[:1] + flags_passthrough)) File "src/summarization.py", line 229, in main decode() File "src/summarization.py", line 196, in decode model = create_model(sess, True) File "src/summarization.py", line 75, in create_model dtype=dtype) File "C:\Harsha\Text Summarization\TensorFlow-Summarization-master\src\bigru_model.py", line 152, in init tf.contrib.seq2seq.dynamic_decode(decoder) File "C:\ProgramData\Anaconda3\lib\site-packages\tensorflow\contrib\seq2seq\python\ops\decoder.py", line 286, in dynamic_decode swap_memory=swap_memory) File "C:\ProgramData\Anaconda3\lib\site-packages\tensorflow\python\ops\control_flow_ops.py", line 2816, in while_loop result = loop_context.BuildLoop(cond, body, loop_vars, shape_invariants) File "C:\ProgramData\Anaconda3\lib\site-packages\tensorflow\python\ops\control_flow_ops.py", line 2640, in BuildLoop pred, body, original_loop_vars, loop_vars, shape_invariants) File "C:\ProgramData\Anaconda3\lib\site-packages\tensorflow\python\ops\control_flow_ops.py", line 2531, in _BuildLoop self._InitializeValues(loop_vars) File "C:\ProgramData\Anaconda3\lib\site-packages\tensorflow\python\ops\control_flow_ops.py", line 2513, in _InitializeValues self._values.add(x.values.name) AttributeError: 'NoneType' object has no attribute 'values'

Did you fixed it?

anirudhsr7 avatar Oct 10 '18 18:10 anirudhsr7

@harshadeepg please elaborate about how you solve this error. I mean should I have to paste subprocess.call(proc, shell=True), in subprocess.py file ?

Did you fixed it

anirudhsr7 avatar Oct 10 '18 18:10 anirudhsr7

@harshadeepg did you fix that error AttributeError: 'NoneType' object has no attribute 'values'

anirudhsr7 avatar Oct 11 '18 12:10 anirudhsr7

I have the same error anyone has a fix for it ! Ping me Please ...

ranaprathap2 avatar Mar 10 '19 05:03 ranaprathap2

Following those instructions, I got an error of file not found. attachment is the screen shot of error. please help

capture

Ya i had the same issue fixed it ! just include shell=true as following subprocess.call(proc, shell = true)

It worked for me !

ranaprathap2 avatar Mar 10 '19 14:03 ranaprathap2

@Affanamin do this , ckpt = ckpt + '.data-00000-of-00001' before this proc = ["python", "src/summarization.py", "--test_file", data_pattern.format(dataset), "--batch_size", str(beam_search), "--test_output", output_file, "--geneos", str(tag), "--checkpoint", ckpt]

Sparsh-Bansal avatar Jul 26 '19 18:07 Sparsh-Bansal