From 3bc8e6d9942041bde27c67d8b7d49d7476a34250 Mon Sep 17 00:00:00 2001 From: TheCount1415 <148774205+TheCount1415@users.noreply.github.com> Date: Mon, 20 Jan 2025 12:31:36 +0100 Subject: [PATCH] Update dirs.py Paths are now raw strings to avoid misinterpretation of the backslash by the interpreter --- modules/dirs.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/dirs.py b/modules/dirs.py index 8801bb4..eaf82dd 100644 --- a/modules/dirs.py +++ b/modules/dirs.py @@ -27,10 +27,10 @@ def find_start(dir): max_env = 0 try: for f in os.listdir(dir + 'pkl/'): - if re.match('env_(\d+).*?\.pkl', f): - env_num = int(re.match('env_(\d+).*?\.pkl', f)[1]) + if re.match(r'env_(\d+).*?\.pkl', f): + env_num = int(re.match(r'env_(\d+).*?\.pkl', f)[1]) if env_num > max_env: max_env = env_num return(max_env+1) except: - raise TypeError("We have a problem.") \ No newline at end of file + raise TypeError("We have a problem.")