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
chenpangpang
transformers
Commits
1988849b
Unverified
Commit
1988849b
authored
Sep 24, 2021
by
Li-Huai (Allan) Lin
Committed by
GitHub
Sep 23, 2021
Browse files
Handle `UnicodeDecodeError` (#13717)
parent
8632a60d
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
src/transformers/configuration_utils.py
src/transformers/configuration_utils.py
+1
-1
No files found.
src/transformers/configuration_utils.py
View file @
1988849b
...
@@ -569,7 +569,7 @@ class PretrainedConfig(PushToHubMixin):
...
@@ -569,7 +569,7 @@ class PretrainedConfig(PushToHubMixin):
raise
EnvironmentError
(
msg
)
raise
EnvironmentError
(
msg
)
except
json
.
JSONDecodeError
:
except
(
json
.
JSONDecodeError
,
UnicodeDecodeError
)
:
msg
=
(
msg
=
(
f
"Couldn't reach server at '
{
config_file
}
' to download configuration file or "
f
"Couldn't reach server at '
{
config_file
}
' to download configuration file or "
"configuration file is not a valid JSON file. "
"configuration file is not a valid JSON file. "
...
...
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