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

Unknown command line flag 'dataset_name' #11

Open
Soumya1612-Rasha opened this issue Jan 14, 2020 · 3 comments
Open

Unknown command line flag 'dataset_name' #11

Soumya1612-Rasha opened this issue Jan 14, 2020 · 3 comments

Comments

@Soumya1612-Rasha
Copy link

Whenever I run the command :
python highlight_heuristic.py -dataset_name=cnn_dm

I get an error as follows:
File "highlight_heuristic.py", line 14, in
FLAGS(sys.argv)
File "C:\Users\Soumya Suvra Ghosal\AppData\Local\Programs\Python\Python36\lib\site-packages\absl\flags_flagvalues.py", line 633, in call
name, value, suggestions=suggestions)
absl.flags._exceptions.UnrecognizedFlagError: Unknown command line flag 'dataset_name'

Can you please tell me how to resolve this issue.

@loganlebanoff
Copy link
Collaborator

Thanks for noticing this issue. I have pushed a new commit -- all I did was remove that line. It should not have been parsing the flags at that point.

@Soumya1612-Rasha
Copy link
Author

Thanks for the change, but it still gives the following error:

File "highlight_heuristic.py", line 115, in
app.run(main)
File "C:\Users\Soumya Suvra Ghosal\AppData\Local\Programs\Python\Python36\lib\site-packages\absl\app.py", line 299, in run
_run_main(main, args)
File "C:\Users\Soumya Suvra Ghosal\AppData\Local\Programs\Python\Python36\lib\site-packages\absl\app.py", line 250, in _run_main
sys.exit(main(argv))
File "highlight_heuristic.py", line 88, in main
total = util.num_lines_in_file(articles_path)
File "G:\summary_rasha\summarization-sing-pair-mix-master\util.py", line 664, in num_lines_in_file
num_lines = sum(1 for line in f)
File "G:\summary_rasha\summarization-sing-pair-mix-master\util.py", line 664, in
num_lines = sum(1 for line in f)
File "C:\Users\Soumya Suvra Ghosal\AppData\Local\Programs\Python\Python36\lib\encodings\cp1252.py", line 23, in decode
return codecs.charmap_decode(input,self.errors,decoding_table)[0]
UnicodeDecodeError: 'charmap' codec can't decode byte 0x9d in position 4771: character maps to

@loganlebanoff
Copy link
Collaborator

After looking at this github issue try changing this line in util.py
with open(file_path) as f:
to
with open(file_path, encoding='utf-8') as f:

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

2 participants