can't suppress warnings astroquery and astrometry.net
- Dominant language
- Python
- Stars
- 791
- Forks
- 451
- Avg merge
- 1d 3h
- Merged PRs (30d)
- 4
Description
command line or top of code suppression of warnings still emits:
gzip was not found on your system! You should solve this issue for astroquery.eso to be at its best!
On POSIX system: make sure gzip is installed and in your path!On Windows: same for 7-zip (http://www.7-zip.org)!
WARNING: Astrometry.net API key not found in configuration file [astroquery.astrometry_net.core]
WARNING: You need to manually edit the configuration file and add it [astroquery.astrometry_net.core]
WARNING: You may also register it for this session with AstrometryNet.key = 'XXXXXXXX' [astroquery.astrometry_net.core]
WARNING: Astrometry.net API key not found in configuration file [astroquery.astrometry_net.core]
WARNING: You need to manually edit the configuration file and add it [astroquery.astrometry_net.core]
WARNING: You may also register it for this session with AstrometryNet.key = 'XXXXXXXX' [astroquery.astrometry_net.core]
Top of code:
import warnings
warnings.filterwarnings(action="ignore")
from astroquery.astrometry_net import AstrometryNet
import astropy.wcs as wcs
import re
import math
from PIL import Image, ImageOps
import os
import sys
ast = AstrometryNet()
ast.api_key = 'azomzzzzzzzzzz' <-- not real key
Contributor guide
Research direction
Start by tracing warning emission in astroquery.eso and astroquery.astrometry_net.core, using the reported AstrometryNet initialization and api_key assignment as entry points. Determine why warnings.filterwarnings(action="ignore") does not suppress these messages, then verify that the gzip and missing-API-key warnings behave correctly when suppression is requested.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- api, backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100