`rust future panicked: unknown error` when opening TIFF files

Đang mở
#97 10 bình luận 1 reaction 0 người được giao Xem trên GitHub

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
52/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Ít trao đổi
Công nghệ
python, rust
Lĩnh vực
computer-vision

Hướng nghiên cứu

Bắt đầu bằng cách chạy MVCE Python được cung cấp với async_tiff.TIFF.open và LocalStore, thay đổi file_id giữa các GDAL TIFF được liệt kê để xác định mẫu panic. Theo dõi đường dẫn lỗi Rust được các đầu vào này kích hoạt và xác minh rằng mỗi trường hợp đều trả về bình thường hoặc một lỗi thông thường thay vì rust future panicked: unknown error.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

Here is an MVCE for rust panics I encountered when building virtual_tiff. The TIFFs are from GDAL's test suite. You can change file_id to switch which TIFF is being opened.

import obstore as obs
from async_tiff import TIFF
from async_tiff.store import LocalStore
import os
import asyncio


# Set which file to run the test on
file_id = 0

# Download file
store = obs.store.HTTPStore.from_url("https://dagshub.com")

panics = [
    ("gdal_gcore", "huge-number-strips.tif"),
    ("gdal_gcore", "byte_user_defined_geokeys.tif"),
    ("gdal_gcore", "minimum_tiff_tags_no_warning.tif"),
    ("gdal_gcore", "uint16_sgilog.tif"),
    ("gdal_gcore", "corrupted_gtiff_tags.tif"),
    ("gdal_gcore", "gtiff_towgs84_override.tif"),
    ("gdal_gcore", "minimum_tiff_tags_with_warning.tif"),
    ("gdal_gcore", "bigtiff_header_extract.tif"),
    ("gdal_gcore", "spaf27_markedcorrect.tif"),
    ("gdal_gcore", "huge-implied-number-strips.tif"),
    ("gdal_gcore", "excessive-memory-TIFFFillStrip2.tif"),
    ("gdal_gcore", "packbits-not-enough-data.tif"),
    ("gdal_gcore", "excessive-memory-TIFFFillStrip.tif"),
    ("gdal_gcore", "byte_bigtiff_invalid_slong8_for_stripoffsets.tif"),
    ("gdal_gcore", "weird_mercator_2sp.tif"),
    ("gdal_gcore", "many_blocks_truncated.tif"),
    ("gdal_autotest", "epsg_27563_allgeokeys.tif"),
    ("gdal_autotest", "nodata_precision_issue_float32.tif"),
    ("gdal_autotest", "byte_coord_epoch.tif"),
    ("gdal_autotest", "projected_GTCitationGeoKey_with_underscore_and_GeogTOWGS84GeoKey.tif"),
    ("gdal_autotest", "nodata_precision_issue_float32.tif"),
    ("gdal_autotest", "missing_tilebytecounts_and_offsets.tif"),
]
path = f"maxrjones/virtual-tiff/raw/73934fbfb31cd5bb099f225a47ac8ea34298f3ea/tests/dvc/{panics[file_id][0]}/{panics[file_id][1]}"


resp = obs.get(store, path)
with open(panics[file_id][1], "wb") as f:
    for chunk in resp:
        f.write(chunk)

# Attempt to open file using async_tiff
async def open_tiff(*, store, path):
    return await TIFF.open(path, store=store)

store = LocalStore()
filepath = f"{os.getcwd()}/{panics[file_id][1]}"


tiff = asyncio.run(open_tiff(store=store, path=filepath))
print(tiff)

Ngôn ngữ chính
Rust
Star
125
Fork
17
Merge trung bình
7 giờ 33 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

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. 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.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của developmentseed/async-tiff

Tất cả issue của developmentseed/async-tiff

Issue tương tự

Thêm issue về Rust

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.