mlem icon indicating copy to clipboard operation
mlem copied to clipboard

Don't assume paths are strings

Open alex000kim opened this issue 3 years ago • 0 comments

Some parts of the code assume paths to be strings e.g. https://github.com/iterative/mlem/blob/4666de893967cdde41bf5ff605acf51a84bc9b68/mlem/utils/path.py#L8

If you pass a pathlib's path, then you'd get the following error:

...
      6 if not path:
      7     return path
----> 8 return path.replace("\\", "/")

TypeError: replace() takes 2 positional arguments but 3 were given

alex000kim avatar Jul 21 '22 16:07 alex000kim