codeprep
codeprep copied to clipboard
why use byte not str while in path (Windows)
https://github.com/giganticode/codeprep/blob/f5a35b68fab930e095a99dbd83e27f63c23552a4/codeprep/pipeline/to_repr.py#L60
eh, I am working with this repository. on windows
I find when I use unicode like chinese in path like "./文档/", to_repr.py is likely to encode this string to bytes, this cause Exception.
unicode bytes like b'\xe6\x96\x87\xe6\xa1\xa3.py' which means ”文档.py“ , in Windows, it means a recursive folder. And python built-in function os.path.basename will not recognize this. When writing MetaData to file, this will raise a FileOrDirNotExist Exception
actually, I change the path to str to avoid this exception, but I dont know if there are any other side effects