Skip to content

Commit

Permalink
use absolute path in error (#3230)
Browse files Browse the repository at this point in the history
  • Loading branch information
Chris Elion authored Jan 15, 2020
1 parent a14c15b commit 5adea00
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion ml-agents/mlagents/trainers/trainer_util.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import os
import yaml
from typing import Any, Dict, TextIO
import logging
Expand Down Expand Up @@ -158,7 +159,8 @@ def load_config(config_path: str) -> Dict[str, Any]:
with open(config_path) as data_file:
return _load_config(data_file)
except IOError:
raise TrainerConfigError(f"Config file could not be found at {config_path}.")
abs_path = os.path.abspath(config_path)
raise TrainerConfigError(f"Config file could not be found at {abs_path}.")
except UnicodeDecodeError:
raise TrainerConfigError(
f"There was an error decoding Config file from {config_path}. "
Expand Down

0 comments on commit 5adea00

Please sign in to comment.