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

ValueError: Unable to configure handler 'file_handler' #36

Open
HJX-zhanS opened this issue Jun 12, 2022 · 3 comments · May be fixed by #41
Open

ValueError: Unable to configure handler 'file_handler' #36

HJX-zhanS opened this issue Jun 12, 2022 · 3 comments · May be fixed by #41

Comments

@HJX-zhanS
Copy link

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

@cuocuo-li
Copy link

remove : change it to _or other label.

@YijianLiu
Copy link

have you solved this?

@rainbow18
Copy link

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'?

1Maxnet1 added a commit to 1Maxnet1/CompGCN that referenced this issue Mar 1, 2023
@1Maxnet1 1Maxnet1 linked a pull request Mar 1, 2023 that will close this issue
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

Successfully merging a pull request may close this issue.

4 participants