BlueBrain / BlueBrain/nexus-python-sdk
Resources update function results in Python HTTP request InvalidSchema error
- Ngôn ngữ chính
- Python
- Star
- 6
- Fork
- 10
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Mô tả
I am calling nexussdk.resources.update on a resource created on Nexus sandbox (nexus-sandbox.io), and the function results in HTTP request results in InvalidSchema error: "No connection adapters were found for 'base:?rev=1'"
Here is the instance object that is used to send the request:
OrderedDict([('@context', ['https://nexus-sandbox.io/v1/resources/kcnitest/redcap/_/medredcontexttest10']), ('@id', 'initial_appointmen_arm_1'), ('_self', 'base:initial_appointmen_arm_1'), ('_constrainedBy', 'https://bluebrain.github.io/nexus/schemas/unconstrained.json'), ('_project', 'https://nexus-sandbox.io/v1/projects/kcnitest/redcap'), ('_rev', 1), ('_deprecated', False), ('_createdAt', '2019-02-12T15:53:26.937Z'), ('_createdBy', 'https://nexus-sandbox.io/v1/realms/github/users/ehsanmaag'), ('_updatedAt', '2019-02-12T15:53:26.937Z'), ('_updatedBy', 'https://nexus-sandbox.io/v1/realms/github/users/ehsanmaag'), ('title', 'Initial Appointment'), ('medred:includesInstrument', ['ex:patient_health_questionnaire_9'])])
It seems the reason is that instance["_self"] does not contain the full request URL.
How can we resolve that?
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Hướng nghiên cứu
Bắt đầu từ nexussdk.resources.update và tái hiện request bằng instance object được hiển thị trong issue. Theo dõi cách giá trị _self, đặc biệt là dạng base:initial_appointmen_arm_1, trở thành request URL; hoàn tất khi thao tác update không còn gây ra InvalidSchema đối với các resource được tạo trên Nexus sandbox.
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
- api, backend
- Loại issue
- Lỗi
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- 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
- 35/100