box / box/box-python-sdk

Report helpful error message for missing "jwt" dependency

Abierto
#526 5 comentarios 5 reacciones 0 asignados Ver en GitHub
enhancement
Lenguaje dominante
Python
Estrellas
459
Forks
223
Merge medio
8 h 57 min
PR fusionados (30 d)
13

Descripción

### Is your feature request related to a problem? Please describe.

As is known from closed issue (https://github.com/box/box-python-sdk/issues/387) if you don't `pip install "boxsdk[jwt]"`, and use the JWT authorization, you get a somewhat confusing message:

```
File "/Users/first.last/workspace/repo_name/box/../lib/box.py", line 70, in get_jwt_client
auth = boxsdk.JWTAuth.from_settings_file(load_config(self.app_name))
AttributeError: 'NoneType' object has no attribute 'from_settings_file'
```

### Describe the solution you'd like

Return an error message instead that at least suggests "Did you try pip install boxsdk[jwt]?" when JWTAuth isn't going to work.

### Additional context
Using sdk version `boxsdk 2.9.0`

Guía de contribución

Abrir la guía de contribución

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.