DaveStrickland / AstroPhotography

Python workflow for processing astrophotography images from either digital cameras and/or amateur telescopes.
GNU General Public License v3.0
22 stars 4 forks source link

Suppress/prevent "WARNING: Astrometry.net API key not found in configuration file [astroquery.astrometry_net.core]" #12

Closed DaveStrickland closed 3 years ago

DaveStrickland commented 3 years ago

Importing AstroPhotography imports classes that use astropy.astroquery Astrometry.net, which will always generate the following warning BEFORE any attempt to register the ey for the session:

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]

See astropy/astroquery/issues/1544

The core issue here is this not a warning warning that can be suppressed the way other warnings can.

Options:

DaveStrickland commented 3 years ago

Was provided with workaround that suppresses the verbose logger warning.