Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: NotImplementedError: cannot instantiate 'PosixPath' on your system on Windows platform #12785

Open
wants to merge 59 commits into
base: master
Choose a base branch
from
Open
Changes from 2 commits
Commits
Show all changes
59 commits
Select commit Hold shift + click to select a range
b81e3c4
fix: updates the posix path on windows os
abdulhakkeempa Mar 5, 2024
cd70d91
fix: updates the posix path on windows os
abdulhakkeempa Mar 5, 2024
934683a
Merge branch 'master' into posix-windows-fix
glenn-jocher Apr 9, 2024
4a1d05b
Merge branch 'master' into posix-windows-fix
UltralyticsAssistant Apr 14, 2024
911f711
Merge branch 'master' into posix-windows-fix
UltralyticsAssistant Apr 18, 2024
4677e9f
Merge branch 'master' into posix-windows-fix
UltralyticsAssistant Apr 27, 2024
68360b3
Merge branch 'master' into posix-windows-fix
UltralyticsAssistant Apr 28, 2024
d7d547c
Auto-format by https://ultralytics.com/actions
UltralyticsAssistant Apr 28, 2024
a1cabb6
Merge branch 'master' into posix-windows-fix
UltralyticsAssistant May 5, 2024
d77d318
Merge branch 'master' into posix-windows-fix
UltralyticsAssistant May 12, 2024
8cff76e
Merge branch 'master' into posix-windows-fix
UltralyticsAssistant May 12, 2024
ef836f3
Merge branch 'master' into posix-windows-fix
UltralyticsAssistant May 12, 2024
1a2402a
Merge branch 'master' into posix-windows-fix
UltralyticsAssistant May 12, 2024
bd6b92e
Merge branch 'master' into posix-windows-fix
UltralyticsAssistant May 13, 2024
cad05ca
Merge branch 'master' into posix-windows-fix
UltralyticsAssistant May 18, 2024
13437b4
Merge branch 'master' into posix-windows-fix
UltralyticsAssistant May 24, 2024
4e737cc
Merge branch 'master' into posix-windows-fix
UltralyticsAssistant May 28, 2024
c4bf637
Merge branch 'master' into posix-windows-fix
UltralyticsAssistant May 29, 2024
a0e8c2b
Merge branch 'master' into posix-windows-fix
UltralyticsAssistant May 29, 2024
07f579e
Merge branch 'master' into posix-windows-fix
UltralyticsAssistant May 30, 2024
1ebd1a6
Merge branch 'master' into posix-windows-fix
UltralyticsAssistant Jun 8, 2024
0b6514d
Merge branch 'master' into posix-windows-fix
UltralyticsAssistant Jun 8, 2024
5b666bd
Merge branch 'master' into posix-windows-fix
UltralyticsAssistant Jun 9, 2024
e555293
Merge branch 'master' into posix-windows-fix
UltralyticsAssistant Jun 16, 2024
3f01baf
Merge branch 'master' into posix-windows-fix
UltralyticsAssistant Jun 16, 2024
cf206ea
Merge branch 'master' into posix-windows-fix
UltralyticsAssistant Jun 17, 2024
14418f9
Merge branch 'master' into posix-windows-fix
UltralyticsAssistant Jun 19, 2024
38d0c61
Merge branch 'master' into posix-windows-fix
UltralyticsAssistant Jun 19, 2024
3aa4922
Merge branch 'master' into posix-windows-fix
UltralyticsAssistant Jun 20, 2024
362e6a0
Merge branch 'master' into posix-windows-fix
UltralyticsAssistant Jun 20, 2024
f23e26c
Merge branch 'master' into posix-windows-fix
UltralyticsAssistant Jun 20, 2024
d55e20d
Merge branch 'master' into posix-windows-fix
UltralyticsAssistant Jun 20, 2024
91396d6
Merge branch 'master' into posix-windows-fix
UltralyticsAssistant Jun 22, 2024
febdafd
Merge branch 'master' into posix-windows-fix
UltralyticsAssistant Jun 30, 2024
fceb1fd
Merge branch 'master' into posix-windows-fix
UltralyticsAssistant Jun 30, 2024
a17e630
Merge branch 'master' into posix-windows-fix
UltralyticsAssistant Jun 30, 2024
3745c83
Merge branch 'master' into posix-windows-fix
UltralyticsAssistant Jul 5, 2024
b75b086
Merge branch 'master' into posix-windows-fix
UltralyticsAssistant Jul 8, 2024
608d108
Merge branch 'master' into posix-windows-fix
UltralyticsAssistant Jul 8, 2024
52e8f59
Merge branch 'master' into posix-windows-fix
UltralyticsAssistant Jul 8, 2024
c4b772c
Merge branch 'master' into posix-windows-fix
UltralyticsAssistant Jul 10, 2024
abf828b
Merge branch 'master' into posix-windows-fix
UltralyticsAssistant Jul 13, 2024
940ac7d
Merge branch 'master' into posix-windows-fix
UltralyticsAssistant Jul 15, 2024
19a6dd9
Merge branch 'master' into posix-windows-fix
UltralyticsAssistant Jul 15, 2024
8e2600e
Merge branch 'master' into posix-windows-fix
UltralyticsAssistant Jul 17, 2024
44fe181
Merge branch 'master' into posix-windows-fix
UltralyticsAssistant Jul 17, 2024
9d4335b
Merge branch 'master' into posix-windows-fix
UltralyticsAssistant Jul 22, 2024
ad35832
Merge branch 'master' into posix-windows-fix
UltralyticsAssistant Jul 23, 2024
1dfb3d6
Merge branch 'master' into posix-windows-fix
UltralyticsAssistant Jul 25, 2024
e9ccd51
Merge branch 'master' into posix-windows-fix
UltralyticsAssistant Jul 29, 2024
79cddf5
Merge branch 'master' into posix-windows-fix
UltralyticsAssistant Jul 29, 2024
c9ca159
Merge branch 'master' into posix-windows-fix
UltralyticsAssistant Aug 11, 2024
00a5690
Merge branch 'master' into posix-windows-fix
UltralyticsAssistant Aug 14, 2024
43cb8ef
Merge branch 'master' into posix-windows-fix
UltralyticsAssistant Aug 14, 2024
fa3876d
Merge branch 'master' into posix-windows-fix
UltralyticsAssistant Aug 19, 2024
6b1097c
Merge branch 'master' into posix-windows-fix
UltralyticsAssistant Aug 20, 2024
0f5f377
Merge branch 'master' into posix-windows-fix
UltralyticsAssistant Aug 20, 2024
44abc83
Merge branch 'master' into posix-windows-fix
UltralyticsAssistant Aug 24, 2024
2090d11
Auto-format by https://ultralytics.com/actions
UltralyticsAssistant Aug 24, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions detect.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,16 @@
import platform
import sys
from pathlib import Path
import pathlib

import torch

# Updating PosixPath on Windows for compatibility
if sys.platform == "win32":
temp = pathlib.PosixPath
pathlib.PosixPath = pathlib.WindowsPath
del temp

FILE = Path(__file__).resolve()
ROOT = FILE.parents[0] # YOLOv5 root directory
if str(ROOT) not in sys.path:
Expand Down
Loading