Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
vision
Commits
f84af6d1
"docs/vscode:/vscode.git/clone" did not exist on "fa750a15bd90f64c1fb53df3227cd0e247e2f1e8"
Unverified
Commit
f84af6d1
authored
Jan 30, 2023
by
Philip Meier
Committed by
GitHub
Jan 30, 2023
Browse files
improve warning message for missing image extension (#7150)
parent
942796ce
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
1 deletion
+6
-1
torchvision/io/image.py
torchvision/io/image.py
+6
-1
No files found.
torchvision/io/image.py
View file @
f84af6d1
...
@@ -10,7 +10,12 @@ from ..utils import _log_api_usage_once
...
@@ -10,7 +10,12 @@ from ..utils import _log_api_usage_once
try
:
try
:
_load_library
(
"image"
)
_load_library
(
"image"
)
except
(
ImportError
,
OSError
)
as
e
:
except
(
ImportError
,
OSError
)
as
e
:
warn
(
f
"Failed to load image Python extension:
{
e
}
"
)
warn
(
f
"Failed to load image Python extension: '
{
e
}
'"
f
"If you don't plan on using image functionality from `torchvision.io`, you can ignore this warning. "
f
"Otherwise, there might be something wrong with your environment. "
f
"Did you have `libjpeg` or `libpng` installed before building `torchvision` from source?"
)
class
ImageReadMode
(
Enum
):
class
ImageReadMode
(
Enum
):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment