CompGCN icon indicating copy to clipboard operation
CompGCN copied to clipboard

ValueError: Unable to configure handler 'file_handler'

Open HJX-zhanS opened this issue 2 years ago • 3 comments

On Windows systems, the name of log file may cause the following errors

Traceback (most recent call last):
  File "D:\Software\Anaconda3\envs\DL_Study\lib\logging\config.py", line 563, in configure
    handler = self.configure_handler(handlers[name])
  File "D:\Software\Anaconda3\envs\DL_Study\lib\logging\config.py", line 744, in configure_handler
    result = factory(**kwargs)
  File "D:\Software\Anaconda3\envs\DL_Study\lib\logging\__init__.py", line 1147, in __init__
    StreamHandler.__init__(self, self._open())
  File "D:\Software\Anaconda3\envs\DL_Study\lib\logging\__init__.py", line 1176, in _open
    return open(self.baseFilename, self.mode, encoding=self.encoding)
OSError: [Errno 22] Invalid argument: 'D:\\MyCode\\Python\\CompGCN-master\\CompGCN-master\\log\\testrun_12_06_2022_11:38:39'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "D:/MyCode/Python/CompGCN-master/CompGCN-master/run.py", line 459, in <module>
    model = Runner(args)
  File "D:/MyCode/Python/CompGCN-master/CompGCN-master/run.py", line 147, in __init__
    self.logger		= get_logger(self.p.name, self.p.log_dir, self.p.config_dir)
  File "D:\MyCode\Python\CompGCN-master\CompGCN-master\helper.py", line 49, in get_logger
    logging.config.dictConfig(config_dict)
  File "D:\Software\Anaconda3\envs\DL_Study\lib\logging\config.py", line 808, in dictConfig
    dictConfigClass(config).configure()
  File "D:\Software\Anaconda3\envs\DL_Study\lib\logging\config.py", line 570, in configure
    raise ValueError('Unable to configure handler '
ValueError: Unable to configure handler 'file_handler'

The code that caused this error is in:run.py->line 451 1655005316151

HJX-zhanS avatar Jun 12 '22 03:06 HJX-zhanS

remove : change it to _or other label.

cuocuo-li avatar Jun 15 '22 11:06 cuocuo-li

have you solved this?

YijianLiu avatar Oct 10 '22 04:10 YijianLiu

On Windows systems, the name of log file may cause the following errors

Traceback (most recent call last):
  File "D:\Software\Anaconda3\envs\DL_Study\lib\logging\config.py", line 563, in configure
    handler = self.configure_handler(handlers[name])
  File "D:\Software\Anaconda3\envs\DL_Study\lib\logging\config.py", line 744, in configure_handler
    result = factory(**kwargs)
  File "D:\Software\Anaconda3\envs\DL_Study\lib\logging\__init__.py", line 1147, in __init__
    StreamHandler.__init__(self, self._open())
  File "D:\Software\Anaconda3\envs\DL_Study\lib\logging\__init__.py", line 1176, in _open
    return open(self.baseFilename, self.mode, encoding=self.encoding)
OSError: [Errno 22] Invalid argument: 'D:\\MyCode\\Python\\CompGCN-master\\CompGCN-master\\log\\testrun_12_06_2022_11:38:39'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "D:/MyCode/Python/CompGCN-master/CompGCN-master/run.py", line 459, in <module>
    model = Runner(args)
  File "D:/MyCode/Python/CompGCN-master/CompGCN-master/run.py", line 147, in __init__
    self.logger		= get_logger(self.p.name, self.p.log_dir, self.p.config_dir)
  File "D:\MyCode\Python\CompGCN-master\CompGCN-master\helper.py", line 49, in get_logger
    logging.config.dictConfig(config_dict)
  File "D:\Software\Anaconda3\envs\DL_Study\lib\logging\config.py", line 808, in dictConfig
    dictConfigClass(config).configure()
  File "D:\Software\Anaconda3\envs\DL_Study\lib\logging\config.py", line 570, in configure
    raise ValueError('Unable to configure handler '
ValueError: Unable to configure handler 'file_handler'

The code that caused this error is in:run.py->line 451 1655005316151

I have the same error, you may first run 'mkdir log'?

rainbow18 avatar Nov 11 '22 11:11 rainbow18