Backend bails out when submitting query without data source: `KeyError: 'datasource'`
Maintainer thường phản hồi trong vòng 1 ngày
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
- 65/100
Hướng nghiên cứu
Bắt đầu tại patzilla/navigator/services/util.py, ở query_expression_util_handler và make_expression_filter, nơi traceback cho thấy mã đang truy cập khóa 'datasource' bị thiếu. Theo dõi cách yêu cầu truy vấn được xác thực và xử lý khi không có nguồn dữ liệu nào được chọn, sau đó thêm hoặc cập nhật một bài kiểm thử tập trung cho yêu cầu đó. Hoàn tất khi gửi một truy vấn như vậy không còn gây ra KeyError ở backend.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Problem
Navigating around wildly, I have been able to submit a query without selecting a data source, which currently makes the backend bail out.
Details
2026-10-27 13:49:04,182 ERROR [waitress ][waitress-2] Exception while serving /api/util/query-expression
Traceback (most recent call last):
File "/path/to/site-packages/waitress/channel.py", line 430, in service
task.service()
~~~~~~~~~~~~^^
File "/path/to/site-packages/waitress/task.py", line 167, in service
self.execute()
~~~~~~~~~~~~^^
File "/path/to/site-packages/waitress/task.py", line 435, in execute
app_iter = self.channel.server.application(environ, start_response)
File "/path/to/site-packages/waitress/proxy_headers.py", line 64, in translate_proxy_headers
return app(environ, start_response)
File "/path/to/site-packages/paste/deploy/config.py", line 306, in __call__
return self.app(environ, start_response)
~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^
File "/path/to/site-packages/pyramid/router.py", line 274, in __call__
response = self.execution_policy(environ, self)
File "/path/to/site-packages/pyramid/router.py", line 283, in default_execution_policy
return request.invoke_exception_view(reraise=True)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^
File "/path/to/site-packages/pyramid/view.py", line 787, in invoke_exception_view
reraise_(*exc_info)
~~~~~~~~^^^^^^^^^^^
File "/path/to/site-packages/pyramid/_compat.py", line 178, in reraise
raise value.with_traceback(tb)
File "/path/to/site-packages/pyramid/router.py", line 281, in default_execution_policy
return router.invoke_request(request)
~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^
File "/path/to/site-packages/pyramid/router.py", line 249, in invoke_request
response = handle_request(request)
File "/path/to/site-packages/pyramid/tweens.py", line 43, in excview_tween
response = _error_handler(request, exc)
File "/path/to/site-packages/pyramid/tweens.py", line 13, in _error_handler
response = request.invoke_exception_view(exc_info)
File "/path/to/site-packages/pyramid/view.py", line 774, in invoke_exception_view
response = _call_view(
registry,
...<7 lines>...
request_iface=request_iface.combined,
)
File "/path/to/site-packages/pyramid/view.py", line 683, in _call_view
response = view_callable(context, request)
File "/path/to/site-packages/pyramid/viewderivers.py", line 401, in viewresult_to_response
result = view(context, request)
File "/path/to/site-packages/pyramid/tweens.py", line 41, in excview_tween
response = handler(request)
File "/path/to/site-packages/pyramid/router.py", line 147, in handle_request
response = _call_view(
registry, request, context, context_iface, view_name
)
File "/path/to/site-packages/pyramid/view.py", line 683, in _call_view
response = view_callable(context, request)
File "/path/to/site-packages/pyramid/config/views.py", line 169, in __call__
return view(context, request)
File "/path/to/site-packages/pyramid/config/views.py", line 188, in attr_view
return view(context, request)
File "/path/to/site-packages/pyramid/config/views.py", line 214, in predicate_wrapper
return view(context, request)
File "/path/to/site-packages/pyramid/viewderivers.py", line 436, in rendered_view
result = view(context, request)
File "/path/to/site-packages/pyramid/viewderivers.py", line 144, in _requestonly_view
response = view(request)
File "/path/to/site-packages/cornice/service.py", line 493, in wrapper
response = view_(request)
File "/path/to/patzilla/patzilla/navigator/services/util.py", line 60, in query_expression_util_handler
expression_data = make_expression_filter(data)
File "/path/to/patzilla/patzilla/navigator/services/util.py", line 69, in make_expression_filter
datasource = data['datasource']
~~~~^^^^^^^^^^^^^^
KeyError: 'datasource'
- Ngôn ngữ chính
- Python
- Star
- 123
- Fork
- 31
- Merge trung bình
- 1 giờ 6 phút
- Pull request đã merge (30 ngày)
- 50
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 ip-tools/patzilla
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
ip-tools/patzilla#139 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày
-
UI: Update BabelĐang mởdependencies help wanted javascript
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 55/100
Maintainer thường phản hồi trong vòng 1 ngày
-
dependencies python
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của ip-tools/patzilla
Issue tương tự
-
Skill submission: negative-test-first (testing discipline; PR creation is collaborator-only)Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
ComposioHQ/awesome-claude-skills#2398 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
bug converter
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
grafana/sigma-rule-deployment#435 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 73/100
datamodel-code-generator/datamodel-code-generator#5589 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Shell: serve the home app's Cookie Policy on a hard reloadCó thể đã có người làm @2001anshkaushik đã nhận hôm nay. Đang mởfeature module:ai
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
rocketride-org/rocketride-server#2899 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 2 ngày
-
GEFSv12
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100