Support for typesense in Subdirectory ?
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 35/100
Hướng nghiên cứu
Start with the URL construction in typesense/api_call.py and the is_healthy entry point shown in typesense/operations.py. Reproduce the node configurations from the issue and inspect how path and port are combined. Done means subdirectory requests form the intended /search/health URL without misplacing the port, with verification for this configuration.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Description
Our installation scheme is to install typesense as a subdirectory, so the url is https://xxx.yyy.ch/search.
But with typesense-python I cannot connect. Restful (tested with Postman) it works.
Is there any explanation ?
Steps to reproduce
following config cannot connect (logfile below)
{
'api_key': _API_KEY,
'nodes': [{
'host': 'xxx.yyy.ch',
'port': '443',
'protocol': 'https',
'path': '/search'
}],
'connection_timeout_seconds': 2
}
And this config appends the port at wrong place [...] with url: /search:443/health
{
'api_key': _API_KEY,
'nodes': [{
'host': 'xxx.yyy.ch/search',
'port': '443',
'protocol': 'https'
}],
'connection_timeout_seconds': 2
}
Log
DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): xxx.yyy.ch:443
DEBUG:urllib3.connectionpool:Starting new HTTPS connection (2): xxx.yyy.ch:443
DEBUG:urllib3.connectionpool:Starting new HTTPS connection (3): xxx.yyy.ch:443
DEBUG:urllib3.connectionpool:Starting new HTTPS connection (4): xxx.yyy.ch:443
Traceback (most recent call last):
File "C:\bin\anaconda3\Lib\site-packages\urllib3\connectionpool.py", line 466, in _make_request
self._validate_conn(conn)
File "C:\bin\anaconda3\Lib\site-packages\urllib3\connectionpool.py", line 1095, in _validate_conn
conn.connect()
File "C:\bin\anaconda3\Lib\site-packages\urllib3\connection.py", line 652, in connect
sock_and_verified = _ssl_wrap_socket_and_match_hostname(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\bin\anaconda3\Lib\site-packages\urllib3\connection.py", line 805, in _ssl_wrap_socket_and_match_hostname
ssl_sock = ssl_wrap_socket(
^^^^^^^^^^^^^^^^
File "C:\bin\anaconda3\Lib\site-packages\urllib3\util\ssl_.py", line 465, in ssl_wrap_socket
ssl_sock = _ssl_wrap_socket_impl(sock, context, tls_in_tls, server_hostname)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\bin\anaconda3\Lib\site-packages\urllib3\util\ssl_.py", line 509, in _ssl_wrap_socket_impl
return ssl_context.wrap_socket(sock, server_hostname=server_hostname)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\bin\anaconda3\Lib\ssl.py", line 517, in wrap_socket
return self.sslsocket_class._create(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\bin\anaconda3\Lib\ssl.py", line 1104, in _create
self.do_handshake()
File "C:\bin\anaconda3\Lib\ssl.py", line 1382, in do_handshake
self._sslobj.do_handshake()
ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1006)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\bin\anaconda3\Lib\site-packages\urllib3\connectionpool.py", line 789, in urlopen
response = self._make_request(
^^^^^^^^^^^^^^^^^^^
File "C:\bin\anaconda3\Lib\site-packages\urllib3\connectionpool.py", line 490, in _make_request
raise new_e
urllib3.exceptions.SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1006)
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "C:\bin\anaconda3\Lib\site-packages\requests\adapters.py", line 486, in send
resp = conn.urlopen(
^^^^^^^^^^^^^
File "C:\bin\anaconda3\Lib\site-packages\urllib3\connectionpool.py", line 843, in urlopen
retries = retries.increment(
^^^^^^^^^^^^^^^^^^
File "C:\bin\anaconda3\Lib\site-packages\urllib3\util\retry.py", line 519, in increment
raise MaxRetryError(_pool, url, reason) from reason # type: ignore[arg-type]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='xxx.yyy.ch', port=443): Max retries exceeded with url: /search/health (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1006)')))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\data\_azure\tgdisearch\health.py", line 14, in <module>
is_healty(active_client)
File "C:\data\_azure\tgdisearch\health.py", line 10, in is_healty
health = client_object.operations.is_healthy()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\bin\anaconda3\Lib\site-packages\typesense\operations.py", line 22, in is_healthy
call_resp = self.api_call.get(Operations.HEALTH_PATH)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\bin\anaconda3\Lib\site-packages\typesense\api_call.py", line 146, in get
return self.make_request(session.get, endpoint, as_json,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\bin\anaconda3\Lib\site-packages\typesense\api_call.py", line 130, in make_request
raise last_exception
File "C:\bin\anaconda3\Lib\site-packages\typesense\api_call.py", line 101, in make_request
r = fn(url, headers={ApiCall.API_KEY_HEADER_NAME: self.config.api_key}, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\bin\anaconda3\Lib\site-packages\requests\sessions.py", line 602, in get
return self.request("GET", url, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\bin\anaconda3\Lib\site-packages\requests\sessions.py", line 589, in request
resp = self.send(prep, **send_kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\bin\anaconda3\Lib\site-packages\requests\sessions.py", line 703, in send
r = adapter.send(request, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\bin\anaconda3\Lib\site-packages\requests\adapters.py", line 517, in send
raise SSLError(e, request=request)
requests.exceptions.SSLError: HTTPSConnectionPool(host='xxx.yyy.ch', port=443): Max retries exceeded with url: /search/health (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1006)')))
Metadata
version = '0.21.0'
- Ngôn ngữ chính
- Python
- Star
- 247
- Fork
- 66
- Merge trung bình
- 22 giờ 47 phút
- Pull request đã merge (30 ngày)
- 8
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
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 typesense/typesense-python
-
`MultiSearchResponse` type does not account for union search response shapeCó thể đã có người làm @tharropoulos đã nhận 172 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
typesense/typesense-python#128 ·
-
`documents.Documents.import_()` `batch_size` argument is ignored, type of `import_parameters` is missing `batch_size`Có thể đã có người làm @tharropoulos đã nhận 245 ngày trước. Đang mở
Độ khó 2/5 1-2 ngày Mức phù hợp với người mới 68/100
typesense/typesense-python#124 ·
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 68/100
typesense/typesense-python#100 ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 35/100
typesense/typesense-python#122 · 3 bình luận ·
-
[Bug] - DeprecationWarning on instantiation of ClientCó thể đã có người làm @tharropoulos đã nhận 266 ngày trước. Đang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 55/100
typesense/typesense-python#114 · 8 bình luận ·
Tất cả issue của typesense/typesense-python
Issue tương tự
-
bug
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
Maintainer thường phản hồi trong vòng 1 ngày
-
documentation
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
sergey-miryanov/gcmon#230 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Azure-Samples/azure-search-openai-demo#3249 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[BUG] Failed archive extraction deletes the dataset cacheCó thể đã có người làm @dajiaohuang đã 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
alibaba/GraphScope#4674 ·