NKI-AI / slidescore-api

Python utilities to interface with SlideScore
Apache License 2.0
3 stars 3 forks source link

Slidescore API crashes when to many request are made #48

Closed martvanrijthoven closed 6 months ago

martvanrijthoven commented 6 months ago

Describe the bug When many images have already been downloaded for a study, downloading new images results in many requests made in a short period to obtain the filename. https://github.com/NKI-AI/slidescore-api/blob/8165f61748e916301c0bef095656d8814cdf320d/slidescore_api/api.py#L240

This crashes the slidescore api with the following error: requests.exceptions.HTTPError: 502 Server Error: Proxy Error for url: https://slidescore.nki.nl/Api/DownloadSlide

To Reproduce Download new images in a study when many images (e.g., >1000) are already downloaded

Expected behavior downloading WSIs should not crash.

Environment SlideScore Python API version: 0.1.0 How installed: pip Python version: 3.9.17 Operating System: debian

Additional context

martvanrijthoven commented 6 months ago

I will create a PR with a quick fix this

AjeyPaiK commented 6 months ago

Hi @martvanrijthoven, thank you for the issue. :)