You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I encountered a NotADirectoryError on creating the temp logging directory while experimenting with the Pong environment "ale_py:ALE/Pong-v5" in Ray RLlib. The error is caused by an unsanitized reserved character (:) in the environment name, which is invalid for directory names on Windows systems.
The env name should be sanitized to remove or replace reserved characters, ensuring that the directory name is valid on all operating systems.
Here is the exception that I encountered:
Traceback (most recent call last):
File "<redacted_path>\atari.py", line 18, in <module>
algo = config.build()
^^^^^^^^^^^^^^
File "<redacted_path>\\.venv\Lib\site-packages\ray\rllib\algorithms\algorithm_config.py", line 949, in build
return algo_class(
^^^^^^^^^^^
File "<redacted_path>\.venv\Lib\site-packages\ray\rllib\algorithms\algorithm.py", line 549, in __init__
logdir = tempfile.mkdtemp(prefix=logdir_prefix, dir=DEFAULT_STORAGE_PATH)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "<redacted_path>\\Python311\Lib\tempfile.py", line 385, in mkdtemp
_os.mkdir(file, 0o700)
NotADirectoryError: [WinError 267] The directory name is invalid: '<redacted_path>\/ray_results\\PPO_ale_py:ALE-Pong-v5_2024-12-28_16-20-57vy4q_uxa'
The directory name sanitization performed here is not enough to avoid having invalid directory names for the windows systems.
See the reference for the reserved characters in Windows here
However, I’d appreciate some guidance before proceeding. I wonder if you’d be happy with this solution or prefer a more comprehensive sanitization approach that also addresses other restrictions, such as name length. We can also consider using pathvalidate#sanitize or porting this function and tests.
Medium: It is a significant difficulty but I can work around it.
The text was updated successfully, but these errors were encountered:
ufukyilmaz
added
bug
Something that is supposed to be working; but isn't
triage
Needs triage (eg: priority, bug/not-bug, and owning component)
labels
Dec 28, 2024
What happened + What you expected to happen
I encountered a NotADirectoryError on creating the temp logging directory while experimenting with the Pong environment "ale_py:ALE/Pong-v5" in Ray RLlib. The error is caused by an unsanitized reserved character (:) in the environment name, which is invalid for directory names on Windows systems.
The env name should be sanitized to remove or replace reserved characters, ensuring that the directory name is valid on all operating systems.
Here is the exception that I encountered:
The directory name sanitization performed here is not enough to avoid having invalid directory names for the windows systems.
See the reference for the reserved characters in Windows here
I can create a simple pull request with the following change to sanitize the environment name:
However, I’d appreciate some guidance before proceeding. I wonder if you’d be happy with this solution or prefer a more comprehensive sanitization approach that also addresses other restrictions, such as name length. We can also consider using pathvalidate#sanitize or porting this function and tests.
Versions / Dependencies
OS: Windows
Reproduction script
Issue Severity
Medium: It is a significant difficulty but I can work around it.
The text was updated successfully, but these errors were encountered: