New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug] TypeError: __array__() takes 1 positional argument but 2 were given #61125
Comments
We have the same issue on numpy 1.20 and 1.21, had to downgrade to torch 1.8.1 torchvision 0.9.1 |
Interesting, I also started seeing this error since last night. |
I did some debug. I think the problem comes from pypi Pillow 8.2.0 -> 8.3.0 update from June 30, 2021. Downgrading with
may resolve the issue. We are using numpy 1.20.2 and latest pytorch build from master. cc @ptrblck |
@t-vi has a pending fix for this issue: python-pillow/Pillow#5572 |
Requirement already satisfied: pillow==8.2.0 in /usr/local/lib/python3.7/dist-packages (8.2.0), Have already the same version , but still encounter the same error |
@plaban1981 Pillow 8.2 doesn't define |
Hi @t-vi sudo pip install pillow==8.2.0 worked |
The latest version 8.3.0 seems to contain a bug, see https://stackoverflow.com/a/68240030 and pytorch/pytorch#61125 (comment) @AdrianSosic , @dasmy : We should definitely cherry-pick this change to main. Otherwise the CI Workflows (and manual package use inside the repository) will not work properly
The latest version 8.3.0 seems to contain a bug, see https://stackoverflow.com/a/68240030 and pytorch/pytorch#61125 (comment) @AdrianSosic , @dasmy : We should definitely cherry-pick this change to main. Otherwise the CI Workflows (and manual package use inside the repository) will not work properly
There's currently a bug that interferes with the .to_tensor() function in torch. see: pytorch/pytorch#61125 (comment) and: python-pillow/Pillow#5572
Yes this can be closed |
Let's close it. Feel free to reopen if needed |
馃悰 Bug
Unable to perform torchvision transform on an image.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
The code should have successfully run and the image should've been transformed.
Environment
Additional context
Stack trace:
cc @fmassa @vfdev-5 @pmeier
The text was updated successfully, but these errors were encountered: