Skip to content

Error in DESI Jupyter notebook code #100

Closed
@SCO-SCI

Description

@SCO-SCI

I am in the 'getting_started' section of the DESI Jupyter notebook. Cell 14 has the code:

Tile file from SURVEY='sv3' and PROGRAM='dark'

tile_file = f'{specprod_dir}zcatalog/ztile-sv3-dark-cumulative.fits'

t_tile = Table.read(tile_file, hdu=1)
ra_tile = t_tile['TARGET_RA']
dec_tile = t_tile['TARGET_DEC']

We will use Tile #30 for the example below

selec_tile = t_tile['TILEID']==30

When I try to execute that code I receive the following error:


FileNotFoundError Traceback (most recent call last)
Cell In[14], line 4
1 # Tile file from SURVEY='sv3' and PROGRAM='dark'
2 tile_file = f'{specprod_dir}zcatalog/ztile-sv3-dark-cumulative.fits'
----> 4 t_tile = Table.read(tile_file, hdu=1)
5 ra_tile = t_tile['TARGET_RA']
6 dec_tile = t_tile['TARGET_DEC']

File ~\AppData\Local\Programs\Python\Python311\Lib\site-packages\astropy\table\connect.py:62, in TableRead.call(self, *args, **kwargs)
59 units = kwargs.pop('units', None)
60 descriptions = kwargs.pop('descriptions', None)
---> 62 out = self.registry.read(cls, *args, **kwargs)
64 # For some readers (e.g., ascii.ecsv), the returned out class is not
65 # guaranteed to be the same as the desired output cls. If so,
66 # try coercing to desired class without copying (io.registry.read
67 # would normally do a copy). The normal case here is swapping
68 # Table <=> QTable.
69 if cls is not out.class:

File ~\AppData\Local\Programs\Python\Python311\Lib\site-packages\astropy\io\registry\core.py:197, in UnifiedInputRegistry.read(self, cls, format, cache, *args, **kwargs)
195 try:
196 ctx = get_readable_fileobj(args[0], encoding='binary', cache=cache)
--> 197 fileobj = ctx.enter()
198 except OSError:
199 raise

File ~\AppData\Local\Programs\Python\Python311\Lib\contextlib.py:137, in _GeneratorContextManager.enter(self)
135 del self.args, self.kwds, self.func
136 try:
--> 137 return next(self.gen)
138 except StopIteration:
139 raise RuntimeError("generator didn't yield") from None

File ~\AppData\Local\Programs\Python\Python311\Lib\site-packages\astropy\utils\data.py:271, in get_readable_fileobj(name_or_obj, encoding, cache, show_progress, remote_timeout, sources, http_headers)
266 if is_url:
267 name_or_obj = download_file(
268 name_or_obj, cache=cache, show_progress=show_progress,
269 timeout=remote_timeout, sources=sources,
270 http_headers=http_headers)
--> 271 fileobj = io.FileIO(name_or_obj, 'r')
272 if is_url and not cache:
273 delete_fds.append(fileobj)

FileNotFoundError: [Errno 2] No such file or directory: '/global/cfs/cdirs/desi/public/edr/spectro/redux/fuji/zcatalog/ztile-sv3-dark-cumulative.fits'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions