From 8ed08dfd8946a7c5c9691d982bf96a70a9ef4e9f Mon Sep 17 00:00:00 2001 From: John Major Date: Sun, 24 Oct 2021 04:49:07 +0000 Subject: [PATCH] resolve the TypeError exeption preventing this function to work in some contexts, specifically if using --list-conda-envs --- snakemake/utils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/snakemake/utils.py b/snakemake/utils.py index 965dd1f53..5b93bee9e 100644 --- a/snakemake/utils.py +++ b/snakemake/utils.py @@ -152,9 +152,9 @@ def set_defaults(validator, properties, instance, schema): def simplify_path(path): """Return a simplified version of the given path.""" - relpath = os.path.relpath(path) + relpath = os.path.relpath(str(path)) if relpath.startswith("../../"): - return path + return str(path) else: return relpath