Skip to content
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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: Argument 'image' has incorrect type (expected numpy.ndarray, got DataArray) #40

Closed
yy522 opened this issue Feb 23, 2022 · 4 comments · Fixed by #50
Closed

Comments

@yy522
Copy link

yy522 commented Feb 23, 2022

Hi I got this error when processing the continental LCZ map for US with my domain in Los Angeles. It looks like an error occurring with the rasterio package. As suggested, I used the LCZ map ends with 'epsg4326'. This error occurred after the screen shows '+ FRC_URB2D, alter LU_INDEX, GREENFRAC and LANDUSEF'. What could be wrong here? Thanks!

image

@yy522
Copy link
Author

yy522 commented Feb 23, 2022

I think the error is related the use of an old version of rasterio package. I had rasterio installed years ago for GIS processing so it was detected when installing W2W and didn't get upgraded to the latest version. I manually upgraded it by 'pip install --upgrade rasterio' and the message wasn't shown any more. Will follow up with any further issues.

@jkittner
Copy link
Collaborator

Thanks for having a look at this, so we might have to add a lower version bound.

Would you mind bisecting which version of rasterio breaks this? Maybe you can also send a PR adding this to here:

w2w/setup.cfg

Line 27 in 9b4fb44

rasterio
for instance rasterio>=0.1.2

I would first have a look at the change from 0.* to 1.* most likely it's this. Or which version did you have installed?

@yy522
Copy link
Author

yy522 commented Feb 23, 2022

Thank you. So the message is here:
image
The old version 1.1.3 broke the W2W procedure. The latest version 1.2.10 worked well.

However, I haven't had the whole procedure run successfully. I got a kill:9 issue and am retrying now. Here's the current outputs to the screen. At least there are no more error about image type.
image

@matthiasdemuzere
Copy link
Owner

Hi @yy522

Did you manage to process all data?
Any feedback on the rasterio versions (lower bounds) that should not be used?

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants