• Glenn Jocher's avatar
    Sidestep `os.path.relpath()` Windows bug (#7158) · e19f87eb
    Glenn Jocher 提交于
    * Sidestep os.path.relpath() Windows bug
    
    os.path.relpath() seems to have a major bug on Windows due to Windows horrible path handling. This fix attempts to sidestep the issue.
    
    ```
    File "C:\Users\mkokg/.cache\torch\hub\ultralytics_yolov5_master\export.py", line 64, in
    ROOT = Path(os.path.relpath(ROOT, Path.cwd())) # relative
    File "C:\Users\mkokg\AppData\Local\Programs\Python\Python310\lib\ntpath.py", line 718, in relpath
    raise ValueError("path is on mount %r, start on mount %r" % (
    ValueError: path is on mount 'C:', start on mount 'D:'
    ```
    
    * Update yolo.py
    
    * Update yolo.py
    
    * Update yolo.py
    
    * Update export.py
    e19f87eb
export.py 27.4 KB