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

Download.rvcurve creates file if object not found #63

Open
cgelino opened this issue Mar 11, 2021 · 0 comments
Open

Download.rvcurve creates file if object not found #63

cgelino opened this issue Mar 11, 2021 · 0 comments

Comments

@cgelino
Copy link
Collaborator

cgelino commented Mar 11, 2021

If you try to download an RV curve for an object that doesn't have an RV curve, Download.rvcurve will save a file with the input object name and the status returned by the call will be "ok'. Example:

from hiresprv.download import Download
data = Download('prv.cookies', './')
rtn = data.rvcurve('garbage')
print(rtn)

{'status': 'ok', 'msg': ''}

A file named vstgarbage.csv is created on disk. This file contains {"status":"Failed to open requested file vstgarbage.csv in your workspace."}. It would be much more useful to have Download.rvcurve return {'status':'Failed', 'msg':'Failed to open requested file vstgarbage.csv in your workspace.'} in this case and for no file to be written out. The documentation for rvcurve says that objname must match an entry in TARGET column, but clearly it will happily process any name you give it.

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

1 participant