Skip to content

get_from_cache in file_utils.py gobbles up error in making url requests #4671

Description

@SinghB

🐛 Bug

No information from the package on SSL error encountered, making it difficult to troubleshoot or figure out a workaround

Information

When trying to do:
TFAutoModelWithLMHead.from_pretrained("t5-small")

Get an error:
TypeError: stat: path should be string, bytes, os.PathLike or integer, not NoneType

The above is a result of an SSL error encountered when trying to fetch the model, however, since the exception handling isn't proper within file_utils.py I don't come to know of it, unless I debug.

Model I am using (Bert, XLNet ...): T5

Language I am using the model on (English, Chinese ...): English

The problem arises when using:

  • [ x] the official example scripts: (give details below)
  • my own modified scripts: (give details below)

https://huggingface.co/transformers/usage.html#summarization

The tasks I am working on is:

  • an official GLUE/SQUaD task: (give the name)
  • [ x] my own task or dataset: (give details below)
    Just getting familiar with transformers for summarization

To reproduce

You need a machine with an expired certificate for proxy etc.

Steps to reproduce the behavior:

  1. See information above

Expected behavior

If there has been an issue in fetching the pre-trained model from s3 bucket etc. I should get an error to that effect.

Environment info

  • transformers version: 2.10.0
  • Platform: Windows 10
  • Python version: 3.7.4
  • PyTorch version (GPU?): NA
  • Tensorflow version (GPU?): 2.0.0 (Yes)
  • Using GPU in script?: No
  • Using distributed or parallel set-up in script?: No

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions