Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error for python -m pyrouge.test #38

Open
yamonc opened this issue Apr 12, 2021 · 7 comments
Open

Error for python -m pyrouge.test #38

yamonc opened this issue Apr 12, 2021 · 7 comments

Comments

@yamonc
Copy link

yamonc commented Apr 12, 2021

Cannot open exception db file for reading: /usr/local/ROUGE/RELEASE-1.5.5/data/WordNet-2.0.exc.db
Traceback (most recent call last):
File "/home/lab214/.local/bin/pyrouge_evaluate_plain_text_files", line 25, in
main()
File "/home/lab214/.local/bin/pyrouge_evaluate_plain_text_files", line 21, in main
output = rouge.convert_and_evaluate(args.system_id, args.split_sents)
File "/home/lab214/.local/lib/python3.5/site-packages/pyrouge/Rouge155.py", line 361, in convert_and_evaluate
rouge_output = self.evaluate(system_id, rouge_args)
File "/home/lab214/.local/lib/python3.5/site-packages/pyrouge/Rouge155.py", line 336, in evaluate
rouge_output = check_output(command).decode("UTF-8")
File "/usr/lib/python3.5/subprocess.py", line 626, in check_output
**kwargs).stdout
File "/usr/lib/python3.5/subprocess.py", line 708, in run
output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['/usr/local/ROUGE/RELEASE-1.5.5/ROUGE-1.5.5.pl', '-e', '/usr/local/ROUGE/RELEASE-1.5.5/data', '-c', '95', '-2', '-1', '-U', '-r', '1000', '-n', '4', '-w', '1.2', '-a', '-m', '/tmp/tmp8bewjckd/rouge_conf.xml']' returned non-zero exit status 13
E.E..
======================================================================
ERROR: test_evaluation (pyrouge.tests.Rouge155_test.PyrougeTest)


Traceback (most recent call last):
File "/home/lab214/anaconda3/envs/torch15tf220/lib/python3.7/site-packages/pyrouge/tests/Rouge155_test.py", line 156, in test_evaluation
pyrouge_output = rouge.evaluate(system_id=11).strip()
File "/home/lab214/anaconda3/envs/torch15tf220/lib/python3.7/site-packages/pyrouge/Rouge155.py", line 336, in evaluate
rouge_output = check_output(command).decode("UTF-8")
File "/home/lab214/anaconda3/envs/torch15tf220/lib/python3.7/subprocess.py", line 411, in check_output
**kwargs).stdout
File "/home/lab214/anaconda3/envs/torch15tf220/lib/python3.7/subprocess.py", line 512, in run
output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['/usr/local/ROUGE/RELEASE-1.5.5/ROUGE-1.5.5.pl', '-e', '/usr/local/ROUGE/RELEASE-1.5.5/data', '-c', '95', '-2', '-1', '-U', '-r', '1000', '-n', '4', '-w', '1.2', '-a', '-m', '/tmp/tmpt78ojqv5/rouge_conf.xml']' returned non-zero exit status 13.

======================================================================
ERROR: test_options (pyrouge.tests.Rouge155_test.PyrougeTest)

Traceback (most recent call last):
File "/home/lab214/anaconda3/envs/torch15tf220/lib/python3.7/site-packages/pyrouge/tests/Rouge155_test.py", line 218, in test_options
pyrouge_output = check_output_clean(pyrouge_command)
File "/home/lab214/anaconda3/envs/torch15tf220/lib/python3.7/site-packages/pyrouge/tests/Rouge155_test.py", line 17, in
check_output_clean = lambda c: check_output(c).decode("UTF-8").strip()
File "/home/lab214/anaconda3/envs/torch15tf220/lib/python3.7/subprocess.py", line 411, in check_output
**kwargs).stdout
File "/home/lab214/anaconda3/envs/torch15tf220/lib/python3.7/subprocess.py", line 488, in run
with Popen(*popenargs, **kwargs) as process:
File "/home/lab214/anaconda3/envs/torch15tf220/lib/python3.7/subprocess.py", line 800, in init
restore_signals, start_new_session)
File "/home/lab214/anaconda3/envs/torch15tf220/lib/python3.7/subprocess.py", line 1551, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'pyrouge_evaluate_plain_text_files.py': 'pyrouge_evaluate_plain_text_files.py'

======================================================================
ERROR: test_rouge_for_plain_text (pyrouge.tests.Rouge155_test.PyrougeTest)

Traceback (most recent call last):
File "/home/lab214/anaconda3/envs/torch15tf220/lib/python3.7/site-packages/pyrouge/tests/Rouge155_test.py", line 173, in test_rouge_for_plain_text
pyrouge_output = check_output_clean(pyrouge_command.split())
File "/home/lab214/anaconda3/envs/torch15tf220/lib/python3.7/site-packages/pyrouge/tests/Rouge155_test.py", line 17, in
check_output_clean = lambda c: check_output(c).decode("UTF-8").strip()
File "/home/lab214/anaconda3/envs/torch15tf220/lib/python3.7/subprocess.py", line 411, in check_output
**kwargs).stdout
File "/home/lab214/anaconda3/envs/torch15tf220/lib/python3.7/subprocess.py", line 512, in run
output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['pyrouge_evaluate_plain_text_files', '-m', 'data/models_plain', '-s', 'data/systems_plain', '-sfp', 'D(\d+).M.100.T.A', '-mfp', 'D#ID#.M.100.T.[A-Z]', '-id', '1']' returned non-zero exit status 1.

======================================================================
ERROR: test_write_config (pyrouge.tests.Rouge155_test.PyrougeTest)

Traceback (most recent call last):
File "/home/lab214/anaconda3/envs/torch15tf220/lib/python3.7/site-packages/pyrouge/tests/Rouge155_test.py", line 197, in test_write_config
check_output(command.split())
File "/home/lab214/anaconda3/envs/torch15tf220/lib/python3.7/subprocess.py", line 411, in check_output
**kwargs).stdout
File "/home/lab214/anaconda3/envs/torch15tf220/lib/python3.7/subprocess.py", line 488, in run
with Popen(*popenargs, **kwargs) as process:
File "/home/lab214/anaconda3/envs/torch15tf220/lib/python3.7/subprocess.py", line 800, in init
restore_signals, start_new_session)
File "/home/lab214/anaconda3/envs/torch15tf220/lib/python3.7/subprocess.py", line 1551, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'pyrouge_write_config_file.py': 'pyrouge_write_config_file.py'

======================================================================
FAIL: test_config_file (pyrouge.tests.Rouge155_test.PyrougeTest)

Traceback (most recent call last):
File "/home/lab214/anaconda3/envs/torch15tf220/lib/python3.7/site-packages/pyrouge/tests/Rouge155_test.py", line 147, in test_config_file
add_data_path("ROUGE-test_11.xml")))
AssertionError: False is not true


Ran 10 tests in 0.367s

FAILED (failures=1, errors=4)

it token almost 4h to solve these problems, but it does not work, How to solve this?thanks a lot.

@geeranlone
Copy link

how did you solve the error

@yiminghua
Copy link

Any update on this? I have the same error.

@geeranlone
Copy link

Any update on this? I have the same error.

which os are u using?

@yiminghua
Copy link

Any update on this? I have the same error.

which os are u using?

Linux

@geeranlone
Copy link

Any update on this? I have the same error.

which os are u using?

Linux

sorry i solved it on windows

@geeranlone
Copy link

but the problem was that i didn't configured pyrouge properly u can try to reconfigure it by following the guidance properly

@willwang636
Copy link

@geerangulzar I'm using windows, could you tell more about how to reconfigure it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants