-
-
Notifications
You must be signed in to change notification settings - Fork 16.2k
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
Windows Python 3.7 .isfile() fix #9879
Conversation
Signed-off-by: SSTato <1210546396@qq.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
π Hello @SSTato, thank you for submitting a YOLOv5 π PR! To allow your work to be integrated as seamlessly as possible, we advise you to:
- β
Verify your PR is up-to-date with
ultralytics/yolov5
master
branch. If your PR is behind you can update your code by clicking the 'Update branch' button or by runninggit pull
andgit merge master
locally. - β Verify all YOLOv5 Continuous Integration (CI) checks are passing.
- β Reduce changes to the absolute minimum required for your bug fix or feature addition. "It is not daily increase but daily decrease, hack away the unessential. The closer to the source, the less wastage there is." β Bruce Lee
Resolve Issue #9866 |
@SSTato I added Windows URL download test to CI in Line 252 in eef9057
|
The problem is that the code 'Path(sources).is_file()' cannot run correctly on my computer. Replacing it with 'os.path.isfile(sources)' can solve this problem. |
Signed-off-by: SSTato <1210546396@qq.com>
@SSTato I wonder if it's a Python 3.7 issue with Windows. I'll update the CI to 3.7 to see what happens. |
Python 3.8 has the same problem |
Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>
Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>
Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>
@SSTato ok I've updated based on fixes in https://github.com/glenn-jocher/yolov5/pull/2 that pass Windows 3.7, 3.8 CI. Can you try the PR now and let me know if this resolves your issue? |
Signed-off-by: SSTato <1210546396@qq.com>
Signed-off-by: SSTato <1210546396@qq.com>
Signed-off-by: SSTato <1210546396@qq.com>
Signed-off-by: SSTato <1210546396@qq.com>
Signed-off-by: SSTato <1210546396@qq.com>
Signed-off-by: SSTato <1210546396@qq.com>
Signed-off-by: SSTato <1210546396@qq.com>
I tested https://github.com/glenn-jocher/yolov5/pull/2, which can be used in python 3.7. For ' python detect py --source https://ultralytics.com/images/zidane.jpg 'No problem but when I' python detect py --source rtsp://admin:abc12345 @192.168.1.71/Streaming/Channels/1 ', it still has errors, and' dataloaders. py 'needs to be modified. After that, it has no errors. |
@SSTato PR is merged. Thank you for your contributions to YOLOv5 π and Vision AI β |
Windows Python 3.7 .isfile() fix (ultralytics#9879)
Signed-off-by: SSTato 1210546396@qq.com
π οΈ PR Summary
Made with β€οΈ by Ultralytics Actions
π Summary
Improved file existence checks in Ultralytics dataloaders and utility functions.
π Key Changes
Path.is_file()
toos.path.isfile()
.π― Purpose & Impact
os
module's file check methods are widely accepted, ensuring better compatibility across different operating systems.