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

FileExistsError #19

Open
cslocum opened this issue May 4, 2021 · 7 comments
Open

FileExistsError #19

cslocum opened this issue May 4, 2021 · 7 comments

Comments

@cslocum
Copy link
Collaborator

cslocum commented May 4, 2021

I'm getting this error while running jwebbinar_prep/pipeline_products_session/jwst-data-products-part1-solutions.ipynb

---------------------------------------------------------------------------
FileExistsError                           Traceback (most recent call last)
<ipython-input-5-5dd118496b0b> in <module>
     11 # Create local links to the cached copy - this is not necessary - you can use the `demo_file`/`demo_ex_file`
     12 # names directly.  But this is a convenient to see what you've downloaded and remind yourself laiter
---> 13 os.symlink(demo_file, uncal_obs)
     14 os.symlink(demo_ex_file, exercise_obs)

FileExistsError: [Errno 17] File exists: '/home/jovyan/.astropy/cache/download/url/97f84d7cd7e7d94a04d4b6526e51b301/contents' -> 'example_nircam_imaging_uncal.fits'

Maybe you can check to see if those symlinks already exist?

@cslocum
Copy link
Collaborator Author

cslocum commented May 4, 2021

image

@cslocum
Copy link
Collaborator Author

cslocum commented May 4, 2021

Also, note the typo (highlighted with cursor) in the screenshot above.

@cslocum
Copy link
Collaborator Author

cslocum commented May 4, 2021

I ran into a similar error with the jwebbinar_prep/pipeline_products_session/jwst-data-products-part2-solutions.ipynb notebook:

image

@cslocum
Copy link
Collaborator Author

cslocum commented May 4, 2021

And, another similar error in jwebbinar_prep/pipeline_products_session/jwst-data-products-part3-solutions.ipynb:

image

@camipacifici
Copy link
Collaborator

@eteq can you have a look at this one when you have a chance please?

@bhilbert4
Copy link
Collaborator

@camipacifici @eteq I wrapped the download_file function in a function of my own that checks for the existence of the file before downloading. Maybe we just need to add something like this to these notebooks? https://github.com/bhilbert4/jwebbinar_prep/blob/imaging-mode/imaging_mode/imaging_mode_stage_1.ipynb

@cslocum
Copy link
Collaborator Author

cslocum commented May 10, 2021

Would it be worth adding a checksum check to make sure the files are actually the same?

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

No branches or pull requests

3 participants