ultralytics 8.1.37 fix empty sys.argv bug (#9390)
Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com> Co-authored-by: Joshua Harrison <108553645+TurbineJoshua@users.noreply.github.com> Co-authored-by: Joshua Harrison <joshua@fido.investments> Co-authored-by: UltralyticsAssistant <web@ultralytics.com>
This commit is contained in:
parent
ed2250cf1c
commit
4a7ccba0af
6 changed files with 31 additions and 15 deletions
|
|
@ -3,7 +3,6 @@
|
|||
import os
|
||||
import platform
|
||||
import random
|
||||
import sys
|
||||
import threading
|
||||
import time
|
||||
from pathlib import Path
|
||||
|
|
@ -11,6 +10,7 @@ from pathlib import Path
|
|||
import requests
|
||||
|
||||
from ultralytics.utils import (
|
||||
ARGV,
|
||||
ENVIRONMENT,
|
||||
LOGGER,
|
||||
ONLINE,
|
||||
|
|
@ -188,7 +188,7 @@ class Events:
|
|||
self.rate_limit = 60.0 # rate limit (seconds)
|
||||
self.t = 0.0 # rate limit timer (seconds)
|
||||
self.metadata = {
|
||||
"cli": Path(sys.argv[0]).name == "yolo",
|
||||
"cli": Path(ARGV[0]).name == "yolo",
|
||||
"install": "git" if is_git_dir() else "pip" if is_pip_package() else "other",
|
||||
"python": ".".join(platform.python_version_tuple()[:2]), # i.e. 3.10
|
||||
"version": __version__,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue