reraise EnvironmentError in modeling_utils.py
Author: abhishekraok
Pull request: yes

When an EnvironmentError occurs in modeling_utils.py, currently the code returns None. This causes a TypeError saying None is not iterable in the statement

            config, model_kwargs = cls.config_class.from_pretrained(
                pretrained_model_name_or_path, *model_args,
                cache_dir=cache_dir, return_unused_kwargs=True,
                force_download=force_download,
                **kwargs
            )

Comments:
# [Codecov](https://codecov.io/gh/huggingface/pytorch-transformers/pull/1075?src=pr&el=h1) Report
> Merging [#1075](https://codecov.io/gh/huggingface/pytorch-transformers/pull/1075?src=pr&el=desc) into [master](https://codecov.io/gh/huggingface/pytorch-transformers/commit/e00b4ff1de0591d5093407b16e665e5c86028f04?src=pr&el=desc) will **decrease** coverage by `0.02%`.
> The diff coverage is `n/a`.

[![Impacted file tree graph](https://codecov.io/gh/huggingface/pytorch-transformers/pull/1075/graphs/tree.svg?width=650&token=9qOlN6Hb1c&height=150&src=pr)](https://codecov.io/gh/huggingface/pytorch-transformers/pull/1075?src=pr&el=tree)

```diff
@@            Coverage Diff             @@
##           master    #1075      +/-   ##
==========================================
- Coverage   79.61%   79.58%   -0.03%     
==========================================
  Files          42       42              
  Lines        6898     6898              
==========================================
- Hits         5492     5490       -2     
- Misses       1406     1408       +2
```


| [Impacted Files](https://codecov.io/gh/huggingface/pytorch-transformers/pull/1075?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pytorch\_transformers/modeling\_utils.py](https://codecov.io/gh/huggingface/pytorch-transformers/pull/1075/diff?src=pr&el=tree#diff-cHl0b3JjaF90cmFuc2Zvcm1lcnMvbW9kZWxpbmdfdXRpbHMucHk=) | `83.41% <ø> (ø)` | :arrow_up: |
| [pytorch\_transformers/tokenization\_bert.py](https://codecov.io/gh/huggingface/pytorch-transformers/pull/1075/diff?src=pr&el=tree#diff-cHl0b3JjaF90cmFuc2Zvcm1lcnMvdG9rZW5pemF0aW9uX2JlcnQucHk=) | `93.89% <0%> (-0.94%)` | :arrow_down: |

------

[Continue to review full report at Codecov](https://codecov.io/gh/huggingface/pytorch-transformers/pull/1075?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/huggingface/pytorch-transformers/pull/1075?src=pr&el=footer). Last update [e00b4ff...14eef67](https://codecov.io/gh/huggingface/pytorch-transformers/pull/1075?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).


# [Codecov](https://codecov.io/gh/huggingface/pytorch-transformers/pull/1075?src=pr&el=h1) Report
> Merging [#1075](https://codecov.io/gh/huggingface/pytorch-transformers/pull/1075?src=pr&el=desc) into [master](https://codecov.io/gh/huggingface/pytorch-transformers/commit/e00b4ff1de0591d5093407b16e665e5c86028f04?src=pr&el=desc) will **decrease** coverage by `0.02%`.
> The diff coverage is `n/a`.

[![Impacted file tree graph](https://codecov.io/gh/huggingface/pytorch-transformers/pull/1075/graphs/tree.svg?width=650&token=9qOlN6Hb1c&height=150&src=pr)](https://codecov.io/gh/huggingface/pytorch-transformers/pull/1075?src=pr&el=tree)

```diff
@@            Coverage Diff             @@
##           master    #1075      +/-   ##
==========================================
- Coverage   79.61%   79.58%   -0.03%     
==========================================
  Files          42       42              
  Lines        6898     6898              
==========================================
- Hits         5492     5490       -2     
- Misses       1406     1408       +2
```


| [Impacted Files](https://codecov.io/gh/huggingface/pytorch-transformers/pull/1075?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pytorch\_transformers/modeling\_utils.py](https://codecov.io/gh/huggingface/pytorch-transformers/pull/1075/diff?src=pr&el=tree#diff-cHl0b3JjaF90cmFuc2Zvcm1lcnMvbW9kZWxpbmdfdXRpbHMucHk=) | `83.41% <ø> (ø)` | :arrow_up: |
| [pytorch\_transformers/tokenization\_bert.py](https://codecov.io/gh/huggingface/pytorch-transformers/pull/1075/diff?src=pr&el=tree#diff-cHl0b3JjaF90cmFuc2Zvcm1lcnMvdG9rZW5pemF0aW9uX2JlcnQucHk=) | `93.89% <0%> (-0.94%)` | :arrow_down: |

------

[Continue to review full report at Codecov](https://codecov.io/gh/huggingface/pytorch-transformers/pull/1075?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/huggingface/pytorch-transformers/pull/1075?src=pr&el=footer). Last update [e00b4ff...14eef67](https://codecov.io/gh/huggingface/pytorch-transformers/pull/1075?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).


# [Codecov](https://codecov.io/gh/huggingface/pytorch-transformers/pull/1075?src=pr&el=h1) Report
> Merging [#1075](https://codecov.io/gh/huggingface/pytorch-transformers/pull/1075?src=pr&el=desc) into [master](https://codecov.io/gh/huggingface/pytorch-transformers/commit/e00b4ff1de0591d5093407b16e665e5c86028f04?src=pr&el=desc) will **decrease** coverage by `0.02%`.
> The diff coverage is `n/a`.

[![Impacted file tree graph](https://codecov.io/gh/huggingface/pytorch-transformers/pull/1075/graphs/tree.svg?width=650&token=9qOlN6Hb1c&height=150&src=pr)](https://codecov.io/gh/huggingface/pytorch-transformers/pull/1075?src=pr&el=tree)

```diff
@@            Coverage Diff             @@
##           master    #1075      +/-   ##
==========================================
- Coverage   79.61%   79.58%   -0.03%     
==========================================
  Files          42       42              
  Lines        6898     6898              
==========================================
- Hits         5492     5490       -2     
- Misses       1406     1408       +2
```


| [Impacted Files](https://codecov.io/gh/huggingface/pytorch-transformers/pull/1075?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pytorch\_transformers/modeling\_utils.py](https://codecov.io/gh/huggingface/pytorch-transformers/pull/1075/diff?src=pr&el=tree#diff-cHl0b3JjaF90cmFuc2Zvcm1lcnMvbW9kZWxpbmdfdXRpbHMucHk=) | `83.41% <ø> (ø)` | :arrow_up: |
| [pytorch\_transformers/tokenization\_bert.py](https://codecov.io/gh/huggingface/pytorch-transformers/pull/1075/diff?src=pr&el=tree#diff-cHl0b3JjaF90cmFuc2Zvcm1lcnMvdG9rZW5pemF0aW9uX2JlcnQucHk=) | `93.89% <0%> (-0.94%)` | :arrow_down: |

------

[Continue to review full report at Codecov](https://codecov.io/gh/huggingface/pytorch-transformers/pull/1075?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/huggingface/pytorch-transformers/pull/1075?src=pr&el=footer). Last update [e00b4ff...14eef67](https://codecov.io/gh/huggingface/pytorch-transformers/pull/1075?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).


# [Codecov](https://codecov.io/gh/huggingface/pytorch-transformers/pull/1075?src=pr&el=h1) Report
> Merging [#1075](https://codecov.io/gh/huggingface/pytorch-transformers/pull/1075?src=pr&el=desc) into [master](https://codecov.io/gh/huggingface/pytorch-transformers/commit/e00b4ff1de0591d5093407b16e665e5c86028f04?src=pr&el=desc) will **decrease** coverage by `0.02%`.
> The diff coverage is `n/a`.

[![Impacted file tree graph](https://codecov.io/gh/huggingface/pytorch-transformers/pull/1075/graphs/tree.svg?width=650&token=9qOlN6Hb1c&height=150&src=pr)](https://codecov.io/gh/huggingface/pytorch-transformers/pull/1075?src=pr&el=tree)

```diff
@@            Coverage Diff             @@
##           master    #1075      +/-   ##
==========================================
- Coverage   79.61%   79.58%   -0.03%     
==========================================
  Files          42       42              
  Lines        6898     6898              
==========================================
- Hits         5492     5490       -2     
- Misses       1406     1408       +2
```


| [Impacted Files](https://codecov.io/gh/huggingface/pytorch-transformers/pull/1075?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pytorch\_transformers/modeling\_utils.py](https://codecov.io/gh/huggingface/pytorch-transformers/pull/1075/diff?src=pr&el=tree#diff-cHl0b3JjaF90cmFuc2Zvcm1lcnMvbW9kZWxpbmdfdXRpbHMucHk=) | `83.41% <ø> (ø)` | :arrow_up: |
| [pytorch\_transformers/tokenization\_bert.py](https://codecov.io/gh/huggingface/pytorch-transformers/pull/1075/diff?src=pr&el=tree#diff-cHl0b3JjaF90cmFuc2Zvcm1lcnMvdG9rZW5pemF0aW9uX2JlcnQucHk=) | `93.89% <0%> (-0.94%)` | :arrow_down: |

------

[Continue to review full report at Codecov](https://codecov.io/gh/huggingface/pytorch-transformers/pull/1075?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/huggingface/pytorch-transformers/pull/1075?src=pr&el=footer). Last update [e00b4ff...14eef67](https://codecov.io/gh/huggingface/pytorch-transformers/pull/1075?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).


# [Codecov](https://codecov.io/gh/huggingface/pytorch-transformers/pull/1075?src=pr&el=h1) Report
> Merging [#1075](https://codecov.io/gh/huggingface/pytorch-transformers/pull/1075?src=pr&el=desc) into [master](https://codecov.io/gh/huggingface/pytorch-transformers/commit/e00b4ff1de0591d5093407b16e665e5c86028f04?src=pr&el=desc) will **not change** coverage.
> The diff coverage is `n/a`.

[![Impacted file tree graph](https://codecov.io/gh/huggingface/pytorch-transformers/pull/1075/graphs/tree.svg?width=650&token=9qOlN6Hb1c&height=150&src=pr)](https://codecov.io/gh/huggingface/pytorch-transformers/pull/1075?src=pr&el=tree)

```diff
@@           Coverage Diff           @@
##           master    #1075   +/-   ##
=======================================
  Coverage   79.61%   79.61%           
=======================================
  Files          42       42           
  Lines        6898     6898           
=======================================
  Hits         5492     5492           
  Misses       1406     1406
```


| [Impacted Files](https://codecov.io/gh/huggingface/pytorch-transformers/pull/1075?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pytorch\_transformers/modeling\_utils.py](https://codecov.io/gh/huggingface/pytorch-transformers/pull/1075/diff?src=pr&el=tree#diff-cHl0b3JjaF90cmFuc2Zvcm1lcnMvbW9kZWxpbmdfdXRpbHMucHk=) | `83.41% <ø> (ø)` | :arrow_up: |
| [pytorch\_transformers/tokenization\_utils.py](https://codecov.io/gh/huggingface/pytorch-transformers/pull/1075/diff?src=pr&el=tree#diff-cHl0b3JjaF90cmFuc2Zvcm1lcnMvdG9rZW5pemF0aW9uX3V0aWxzLnB5) | `86.22% <ø> (ø)` | :arrow_up: |

------

[Continue to review full report at Codecov](https://codecov.io/gh/huggingface/pytorch-transformers/pull/1075?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/huggingface/pytorch-transformers/pull/1075?src=pr&el=footer). Last update [e00b4ff...c603d09](https://codecov.io/gh/huggingface/pytorch-transformers/pull/1075?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).


# [Codecov](https://codecov.io/gh/huggingface/pytorch-transformers/pull/1075?src=pr&el=h1) Report
> Merging [#1075](https://codecov.io/gh/huggingface/pytorch-transformers/pull/1075?src=pr&el=desc) into [master](https://codecov.io/gh/huggingface/pytorch-transformers/commit/e00b4ff1de0591d5093407b16e665e5c86028f04?src=pr&el=desc) will **decrease** coverage by `0.02%`.
> The diff coverage is `n/a`.

[![Impacted file tree graph](https://codecov.io/gh/huggingface/pytorch-transformers/pull/1075/graphs/tree.svg?width=650&token=9qOlN6Hb1c&height=150&src=pr)](https://codecov.io/gh/huggingface/pytorch-transformers/pull/1075?src=pr&el=tree)

```diff
@@            Coverage Diff             @@
##           master    #1075      +/-   ##
==========================================
- Coverage   79.61%   79.58%   -0.03%     
==========================================
  Files          42       42              
  Lines        6898     6898              
==========================================
- Hits         5492     5490       -2     
- Misses       1406     1408       +2
```


| [Impacted Files](https://codecov.io/gh/huggingface/pytorch-transformers/pull/1075?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pytorch\_transformers/modeling\_utils.py](https://codecov.io/gh/huggingface/pytorch-transformers/pull/1075/diff?src=pr&el=tree#diff-cHl0b3JjaF90cmFuc2Zvcm1lcnMvbW9kZWxpbmdfdXRpbHMucHk=) | `83.41% <ø> (ø)` | :arrow_up: |
| [pytorch\_transformers/tokenization\_bert.py](https://codecov.io/gh/huggingface/pytorch-transformers/pull/1075/diff?src=pr&el=tree#diff-cHl0b3JjaF90cmFuc2Zvcm1lcnMvdG9rZW5pemF0aW9uX2JlcnQucHk=) | `93.89% <0%> (-0.94%)` | :arrow_down: |

------

[Continue to review full report at Codecov](https://codecov.io/gh/huggingface/pytorch-transformers/pull/1075?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/huggingface/pytorch-transformers/pull/1075?src=pr&el=footer). Last update [e00b4ff...14eef67](https://codecov.io/gh/huggingface/pytorch-transformers/pull/1075?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).


Indeed, good practice.

Do you think you could update the `from_pretrained()` method of the `PretrainedConfig` and `PreTrainedTokenizer` classes as well?

done

Thanks a lot @abhishekraok!