-
Notifications
You must be signed in to change notification settings - Fork 18
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
Error in DESI Jupyter notebook code #100
Comments
Hello, are you running the tutorial from a jupyter notebook at NERSC (https://jupyter.nersc.gov/) or from another machine? If you are running elsewhere, that is a known issue with some of our tutorials but we thank you for reminding us that this is an ongoing problem for our users. We will work to make this more agnostic so that it can work on other machines. |
Hello @SCO-SCI. From lines like this one ~\AppData\Local\Programs, it looks to me like you are running the notebook on your Windows machine. Is that correct? I am asking that because the notebook you are using is only expected to work as-is on NERSC (https://jupyter.nersc.gov/). If you do not have access to NERSC, you can try using this cloud-based service instead: https://datalab.noirlab.edu/desi/index.php. There, you also have access to some of the DESI data. |
Yes, I am running this from a local Windows machine as I do not have a NERSC ID. Upon further reading I understand these notebooks were designed to run at NERSC so that explains the problem. I also read that there are two tutorials that should run in non-NEARSC environments: intro_to_DESI_EDR_files.ipynb and |
Thank you @SCO-SCI for trying this out! Please let us know if run into any other issue. |
@SCO-SCI FYI we don't officially support windows, but we also don't purposefully break things for windows, so if you encounter any other problems please let us know and we'll see if there is an easy workaround or not. |
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 not65 # 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'
The text was updated successfully, but these errors were encountered: