openslide / openslide-python

Python bindings to OpenSlide
https://openslide.org/
GNU Lesser General Public License v2.1
374 stars 183 forks source link

Detecting mitosis from whole slide images(MIDOG21 Challenge) #279

Closed noor-alzoubi closed 1 month ago

noor-alzoubi commented 1 month ago

Operating system

windows

Platform

64

OpenSlide Python version

1.3.1

OpenSlide version

4.0.0

Slide format

tiff

Issue details

OSError: [Errno 22] Invalid argument: '<PIL.Image.Image image mode=RGB size=512x512 at 0x18D71EA6E50>'

bgilbert commented 1 month ago

Could you post the relevant portion of the backtrace and code?

noor-alzoubi commented 1 month ago

I don't understand you. This is the first time I'm asking a question here because I need an answer. I wanted to run some code on github for research purposes and came across this error, but I couldn't fix it. I was looking for solutions, so I'm asking this error so I can find suggestions to fix it.

On Tue, Oct 1, 2024, 12:40 AM Benjamin Gilbert @.***> wrote:

Could you post the relevant portion of the backtrace and code?

— Reply to this email directly, view it on GitHub https://github.com/openslide/openslide-python/issues/279#issuecomment-2384190455, or unsubscribe https://github.com/notifications/unsubscribe-auth/A6NEICXMFQ2XQZ6424F5MDLZZHAL7AVCNFSM6AAAAABPEGBHDKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGOBUGE4TANBVGU . You are receiving this because you authored the thread.Message ID: @.***>

bgilbert commented 1 month ago

You did not give enough information to understand what the problem is. Your error message included additional lines of text, so please post those too. Also post a link to the code you found on GitHub, or paste the lines of code that cause the error.

noor-alzoubi commented 1 month ago

When I ran the code in this link( https://github.com/DeepMicroscopy/MIDOG/tree/main), especially in (the baseline) folder, I encountered this problem (ValueError: setting an array element with a sequence. The requested array has an inhomogeneous shape after 2 dimensions. The detected shape was (6000, 2) + inhomogeneous part.) ..After making some adjustments like resizing images I encountered this error.(OSError: [Errno 22] Invalid argument: '<PIL.Image.Image image mode=RGB size=512x512 at 0x18D71EA6E50>')

‫في الثلاثاء، 1 أكتوبر 2024 في 3:53 ص تمت كتابة ما يلي بواسطة ‪Benjamin Gilbert‬‏ @.***‬‏>:‬

You did not give enough information to understand what the problem is. Your error message included additional lines of text, so please post those too. Also post a link to the code you found on GitHub, or paste the lines of code that cause the error.

— Reply to this email directly, view it on GitHub https://github.com/openslide/openslide-python/issues/279#issuecomment-2384569955, or unsubscribe https://github.com/notifications/unsubscribe-auth/A6NEICV7ARHBY4H7FM4W3WLZZHXARAVCNFSM6AAAAABPEGBHDKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGOBUGU3DSOJVGU . You are receiving this because you authored the thread.Message ID: @.***>

bgilbert commented 1 month ago

Okay, I understand that you've modified the MIDOG code. It seems likely that you're passing a PIL.Image to code that doesn't expect one.

To help you further, I'll need to see the full error message and the code that calls into OpenSlide Python.

bgilbert commented 1 month ago

Closing due to lack of response. If you can supply the additional information needed, please feel free to comment here.