Google App Engine 1 (Python 2) Issue for making requests to algolia
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 35/100
- Loại issue
- Tài liệu
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- python
- Lĩnh vực
- documentation
Hướng nghiên cứu
Trước tiên, hãy xem xét các chi tiết tương thích của issue với Google App Engine 1 (Python 2) và hướng dẫn Requests được liên kết. Ghi lại rằng người dùng GAE1 cần AppEngineAdapter của requests_toolbelt thay cho adapter mặc định, đồng thời xác minh rằng tài liệu xác định rõ cấu hình bị ảnh hưởng.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
- Version: 2.4.0
Underlying cause
I am using Algolia in Google App Engine (GAE1) and we are using requests library to issue requests as well. However, due to GAE1 limitations, we need to use an additional library called requests_toolbelt. This library changes underlying requests library to use urlfetch. Details of that can be found here.
In Requester, Algolia library is importing HttpAdapter which is the wrong adapter for the GAE1 that using requests library. It needs to import AppEngineAdapter from requests_toolbelt to correctly read the response otherwise request will fail.
I have fixed the problem by introducing a custom code.
import sys
if sys.version_info >= (3, 0):
self._session.mount("https://", HTTPAdapter(max_retries=Retry(connect=0)))
else:
from requests_toolbelt.adapters.appengine import AppEngineAdapter
self._session.mount('https://', AppEngineAdapter(max_retries=Retry(connect=0)))
This solution only works for the GAE1 which is fine for me. This issue is also can be closed. However, it would be helpful to have a section in Algolia Docs to mention this problem since it will affect other App Engine users.
- Ngôn ngữ chính
- Python
- Star
- 207
- Fork
- 63
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của algolia/algoliasearch-client-python
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
-
Version 4.31.0 introduced breaking urllib3 dependency constraint incompatible with other packagesĐang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 35/100
-
KeyError: 'facets'Đang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 30/100
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 35/100
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 25/100
algolia/algoliasearch-client-python#565 · 1 bình luận · 2 reaction ·
Tất cả issue của algolia/algoliasearch-client-python
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
volcengine/OpenViking#8432 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Failed chat turns are passed to the follow-up rewrite as completed historyCó thể đã có người làm @hskhyl đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
NVIDIA/auto-ontology#683 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
documentation task
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
-
Implement parse_url and accept http URLs for Pear backendCó thể đã có người làm @muskan-creates352 đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
fedora-infra/anitya#2231 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
MarkdownDocSerializer.post_process escapes '\<' to '\<', rendering literal '<' in CommonMarkĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
docling-project/docling-core#1067 ·
Maintainer thường phản hồi trong vòng 3 ngày