nlpyang / BertSum

Code for paper Fine-tune BERT for Extractive Summarization
Apache License 2.0
1.46k stars 422 forks source link

No such file or directory: '../logs/cnndm.log' #88

Closed siddas27 closed 4 years ago

siddas27 commented 4 years ago

python preprocess.py -mode tokenize -raw_path ../raw_data -save_path ../json_datas got this error:

Traceback (most recent call last):
  File "preprocess.py", line 62, in <module>
    init_logger(args.log_file)
  File "/home/sid/project/BertSum-master/src/others/logging.py", line 19, in init_logger
    file_handler = logging.FileHandler(log_file)
  File "/opt/anaconda/envs/nlp/lib/python3.7/logging/__init__.py", line 1087, in __init__
    StreamHandler.__init__(self, self._open())
  File "/opt/anaconda/envs/nlp/lib/python3.7/logging/__init__.py", line 1116, in _open
    return open(self.baseFilename, self.mode, encoding=self.encoding)
FileNotFoundError: [Errno 2] No such file or directory: '../logs/cnndm.log'
RafaelWO commented 4 years ago

Check if the relative paths (../) are valid for working directory (for your call your working dir should be path/to/bertsum/src). Otherwise, creating the folder + file could help.

siddas27 commented 4 years ago

My working directory is insidesrc only. But couldn't find the cnndm.log file anywhere. Can you tell me from where I can get it or create it?

RafaelWO commented 4 years ago

Just create a file named cmmd.log via your file explorer (or CLI or whatever you want).

siddas27 commented 4 years ago

Thanks, I thought I have to download it from somewhere

RafaelWO commented 4 years ago

So I guess you can close this issue? :heavy_check_mark: