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

XMMPointed download method causes a FileNotFoundError #282

Open
jessicapilling opened this issue May 29, 2024 · 5 comments
Open

XMMPointed download method causes a FileNotFoundError #282

jessicapilling opened this issue May 29, 2024 · 5 comments
Assignees
Labels
bug Something isn't working

Comments

@jessicapilling
Copy link
Collaborator

When using XMMPointed.download() a filenotfound error is raised.

This occurs right after the download has happened, as it is trying to unzip a tarfile that doesnt exist.

I found out that the astroquery module will only download the file into the current working directory, even when you provide an absolute path the 'filename' argument. So this error will occur if you arent running DAXA from the directory where you want to download the data to.

eg.
AQXMMNewton.download_data(observation_id='0810244301', level='ODF', filename='/Users/jp735/Desktop/xmm_pointed_raw/0810244301')

will not download to '/Users/jp735/Desktop/xmm_pointed_raw/'

it will download 0810244301.tar.gz to the current working directory.

@DavidT3
Copy link
Owner

DavidT3 commented May 29, 2024

Okay I didn't know about this! My main question is why would this be causing a problem now when it never has before? And what was it doing before, just downloading the tar into the same directory as the notebook/script, and then decompressing it into the correct place?

@jessicapilling
Copy link
Collaborator Author

that is what I really cant figure out. I have no idea why this problem has only just appeared now.

@DavidT3
Copy link
Owner

DavidT3 commented May 30, 2024

Remind me how/why we first found out about this? Could you reproduce the problem?

It is possible a different version of AstroQuery changed the behaviour here, that would be one reason.

@jessicapilling
Copy link
Collaborator Author

Joe found it when he was trying to set up XGA a couple of weeks ago.

I could recreate it.

My version of astroquery was the same version listed the requirements.txt, so thats why I cant figure out why this issue has just appeared recently.

@DavidT3
Copy link
Owner

DavidT3 commented May 31, 2024

I'm confused about this - I can't recreate it with my current DAXA dev install, but clearly there is no harm in what you've added and it fixes the problem you could reproduce, so let's just be happy you fixed it I guess :')

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants