Unverified Commit 1988849b authored by Li-Huai (Allan) Lin's avatar Li-Huai (Allan) Lin Committed by GitHub
Browse files

Handle `UnicodeDecodeError` (#13717)

parent 8632a60d
......@@ -569,7 +569,7 @@ class PretrainedConfig(PushToHubMixin):
raise EnvironmentError(msg)
except json.JSONDecodeError:
except (json.JSONDecodeError, UnicodeDecodeError):
msg = (
f"Couldn't reach server at '{config_file}' to download configuration file or "
"configuration file is not a valid JSON file. "
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment