CDAT / cdms

8 stars 10 forks source link

CDMSError('Cannot open file %s (%s)' % (path, err)) #413

Open Blue-Taylor opened 3 years ago

Blue-Taylor commented 3 years ago

Hi,

I am new to Python and CDAT. I get the following error while trying to open a NetCDF file. _>>> import cdms2

f = cdms2.open('upstr_mean.nc') CDMS system error: No such file or directory CDMS I/O error: Opening file /home/vikas/Desktop/upstr_mean.nc Traceback (most recent call last): File "/home/vikas/anaconda3/envs/cdat/lib/python3.7/site-packages/cdms2/dataset.py", line 1275, in init fileobj = Cdunif.CdunifFile(path, mode) OSError: No error

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "", line 1, in File "/home/vikas/anaconda3/envs/cdat/lib/python3.7/site-packages/cdms2/dataset.py", line 497, in openDataset return CdmsFile(path, mode, mpiBarrier=CdMpi) File "/home/vikas/anaconda3/envs/cdat/lib/python3.7/site-packages/cdms2/dataset.py", line 1277, in init raise CDMSError('Cannot open file %s (%s)' % (path, err)) cdms2.error.CDMSError: Cannot open file /home/vikas/Desktop/upstrmean.nc (No error)

What do I do?

angshuiisc commented 3 years ago

Hi,

It seems like you are not providing the correct path to your file. provide the path where your file is located

On Sun, Aug 2, 2020 at 2:25 PM Blue-Taylor notifications@github.com wrote:

Hi,

I am new to Python and CDAT. I get the following error while trying to open a NetCDF file. _>>> import cdms2

f = cdms2.open('upstr_mean.nc') CDMS system error: No such file or directory CDMS I/O error: Opening file /home/vikas/Desktop/upstr_mean.nc Traceback (most recent call last): File "/home/vikas/anaconda3/envs/cdat/lib/python3.7/site-packages/cdms2/dataset.py", line 1275, in init fileobj = Cdunif.CdunifFile(path, mode) OSError: No error

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "", line 1, in File "/home/vikas/anaconda3/envs/cdat/lib/python3.7/site-packages/cdms2/dataset.py", line 497, in openDataset return CdmsFile(path, mode, mpiBarrier=CdMpi) File "/home/vikas/anaconda3/envs/cdat/lib/python3.7/site-packages/cdms2/dataset.py", line 1277, in init raise CDMSError('Cannot open file %s (%s)' % (path, err)) cdms2.error.CDMSError: Cannot open file /home/vikas/Desktop/upstrmean.nc (No error)

What do I do?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/CDAT/cdat/issues/2258, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEOZ445WEKIVXLWRXMNEVZ3R6VLKVANCNFSM4PSQW7EQ .

--

Google scholar: https://scholar.google.co.in/citations?hl=en&user=usTfAoEAAAAJ https://scholar.google.co.in/citations?hl=en&user=usTfAoEAAAAJ