Skip to content

Tokio hangs when opening TIFF #89

Open
@maxrjones

Description

@maxrjones

This example seems to hang, @kylebarron suggested in may relate to the intersection between exceptions, panics, and async futures

from async_tiff import TIFF
from async_tiff.store import HTTPStore
from urllib.parse import urlparse
import asyncio

year = 2000
file_name = "50N_120W"
url = f"https://storage.googleapis.com/earthenginepartners-hansen/GLCLU2000-2020/v2/{year}/{file_name}.tif"
parsed = urlparse(url)
store = HTTPStore.from_url(f"{parsed.scheme}://{parsed.netloc}")
async def open_tiff(*, store, path):
    return await TIFF.open(path, store=store)

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

fyi @TomNicholas

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions