1

I was trying to go through this code and constantly getting an error while importing import rioxarray as rio in python. The details of code in below.....

    outfilename = os.path.join(output_folder,'Runoff_monthly_%s.%02s.%02s.tif' %(Date.strftime('%Y'), Date.strftime('%m'), '01'))
    x = pr.rio.to_raster(outfilename)              
    print("IMD",ncfile['time'][i])
    i+=1

the error i am getting in below....

File "rioxarray.py", line 26, in from rioxarray.exceptions import (

ImportError: No module named exceptions

I am trying to solve this error while i am executing this code..

File "rioxarray.py", line 26, in from rioxarray.exceptions import ( ImportError: No module named exceptions

3 Answers3

0

1-The "rioxarray" package is not installed in your current environment: You can check if the package is installed by running "pip freeze" in your terminal and looking for the "rioxarray" package in the list. If it is not there, you can install it using "pip install rioxarray" url pypi.

2-The package version you have installed might not contain the "exceptions" module, you can check this by running pip show rioxarray, it will show you the package version, you can try updating the package using pip install --upgrade rioxarray.

sp 4_4
  • 122
  • 6
0

This error maybe occured because the module rioxarray module is not being properly installed try reinstalling it in Command prompt using

    pip install rioxarray
0

I have already checked the list and the "rioxarray" already installed in my environment.