adapter.aasx: Missing supplementary file aborts reading with failsafe
Maintainer thường phản hồi trong vòng 4 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
- 76/100
Hướng nghiên cứu
Bắt đầu với _add_supplementary_file() và lời gọi open_part() trong sdk/basyx/aas/adapter/aasx.py tại các dòng được liên kết. Kiểm tra cách các luồng đọc hiện có xử lý những phần bị thiếu trong gói và cách chế độ failsafe được kiểm thử. Công việc hoàn tất khi phần bổ sung bị thiếu được ghi log và bỏ qua với failsafe=True, còn failsafe=False gây ra lỗi rõ ràng.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
AASXReader.read_into() raises KeyError when a File element
or the default thumbnail points to a part that is not in the package,
even with failsafe=True:
The object is already in the object_store at that point, so the
read stops half-way.
Steps to reproduce:
sm = model.Submodel("urn:sm:1", submodel_element=[
model.File("f", "application/pdf", "/aasx/missing.pdf")])
# the writer only logs a warning and writes the package
with aasx.AASXWriter("x.aasx", failsafe=True) as w:
w.write_all_aas_objects(
"/aasx/data.json", model.DictIdentifiableStore([sm]),
aasx.DictSupplementaryFileContainer())
with aasx.AASXReader("x.aasx", failsafe=True) as r:
r.read_into(model.DictIdentifiableStore(),
aasx.DictSupplementaryFileContainer())
# KeyError: 'Could not find part /aasx/missing.pdf in package'
The repository server calls load_directory() at import, so one such
file in INPUT stops the container from starting.
Expected behavior: With failsafe=True, the missing part is
logged and skipped, like other defects. With failsafe=False, a clear
error is raised.
Actual behavior: KeyError in both modes; the objects read so far
stay in the store.
Environment: develop @ 2773ac06.
Possible fix: Catch KeyError around open_part() in
_add_supplementary_file(): log and return None if failsafe,
otherwise re-raise. Our own writer produces such packages in failsafe
mode (see #228), so the reader should accept them.
- Ngôn ngữ chính
- Python
- Star
- 105
- Fork
- 56
- Merge trung bình
- 4 ngày 1 giờ
- Pull request đã merge (30 ngày)
- 3
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 eclipse-basyx/basyx-python-sdk
-
server: XML responses contain `cursor="None"` on the last pageCó thể đã có người làm @qiaobochi040726-source đã nhận 1 ngày trước. Đang mởbug good-first-issue server
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
eclipse-basyx/basyx-python-sdk#673 ·
Maintainer thường phản hồi trong vòng 4 ngày
-
adapter.aasx: Failsafe writer adds duplicate parts for conflicting filesCó thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mởbug good-first-issue sdk
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
eclipse-basyx/basyx-python-sdk#671 ·
Maintainer thường phản hồi trong vòng 4 ngày
-
enhancement good-first-issue server
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 80/100
eclipse-basyx/basyx-python-sdk#670 ·
Maintainer thường phản hồi trong vòng 4 ngày
-
bug server
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
eclipse-basyx/basyx-python-sdk#663 ·
Maintainer thường phản hồi trong vòng 4 ngày
-
README CI badge is brokenCó thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mởbug documentation
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 85/100
eclipse-basyx/basyx-python-sdk#656 ·
Maintainer thường phản hồi trong vòng 4 ngày
Tất cả issue của eclipse-basyx/basyx-python-sdk
Issue tương tự
-
Project submission:Đang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 72/100
slavakurilyak/awesome-ai-agents#845 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
tests: pin that the atomic writers in utils/paths.py stage the temporary file in the target's directoryCó thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mởdifficulty:2 enhancement good first issue
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 92/100
MakazhanAlpamys/Soup#2178 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[BUG] dcg.waggr permutation p-values are folded twice, so near-zero scores get the smallest p-valuesĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
scverse/rapids-singlecell#854 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Slang input: int8_t4_packed and uint8_t4_packed are copied into CrossGLCó thể đã có người làm @ninglinLiu đã nhận hôm nay. Đang mởarea:frontend backend:slang bug direction:input
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
Maintainer thường phản hồi trong vòng 1 ngày
-
random_elements(unique=True) on an OrderedDict: ZeroDivisionError once only zero weights remain, AssertionError with use_weighting=FalseCó thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
Maintainer thường phản hồi trong vòng 13 ngày