Report helpful error message for missing "jwt" dependency
- Ngôn ngữ chính
- Python
- Star
- 459
- Fork
- 223
- Merge trung bình
- 8 giờ 57 phút
- Pull request đã merge (30 ngày)
- 13
Mô tả
### 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`
Hướng dẫn đóng góp
Hướng nghiên cứu
Start by tracing the JWTAuth.from_settings_file call shown in the report and inspect how the optional jwt dependency is loaded. Reproduce the missing-dependency case without installing boxsdk[jwt], then make the failure suggest pip install boxsdk[jwt] and verify that the existing JWT path still works when the dependency is installed.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- python
- Lĩnh vực
- authentication
- Loại issue
- Tính năng
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 48/100