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

Automatic IAU source naming does not work in the archive endpoint #548

Closed
1 of 4 tasks
DanielWarshofsky opened this issue Apr 26, 2024 · 1 comment
Closed
1 of 4 tasks
Labels
bug Something isn't working

Comments

@DanielWarshofsky
Copy link

DanielWarshofsky commented Apr 26, 2024

Please fill out relevant sections below; remove those that are unused.

Describe the bug
when posting to the https://fritz.science/api/archive endpoint without specifying an obj_id the error message Only letters, numbers, underscores, semicolons, colons, +, and - are allowed in source ID is returned. This is because when obj_id=None the radec_to_iau is used to create a name for the source but this will include a . in the name

To Reproduce
Steps to reproduce the behavior:
run

import json
import pathlib
import requests
import urllib
token = "My Token"
params={'catalog':'ZTF_sources_20240117',
            'light_curve_ids':[11534622048883],
            'group_ids':[1678],
            'ra':1,
            'dec':1}
url = urllib.parse.urljoin("https://fritz.science/", f'/api/archive')
headers = {'Authorization': f'token {token}'}
p = requests.post(url, headers=headers, json=params)
print(p.json()['message'])

Platform information:

  • Interface
    • I am using the API
    • I am browsing on a desktop
    • I am browsing on a phone
    • I am browsing on a tablet
@DanielWarshofsky DanielWarshofsky added the bug Something isn't working label Apr 26, 2024
@DanielWarshofsky
Copy link
Author

This works now.

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

1 participant