RefreshError “invalid_grant" when running ProcessFITS.ipynb

Hi Panoptes fellows,

I met a problem when running the example program ( “matched_sources = image_processing.match_sources(detected_sources, wcs0, Settings = Settings)” gets an error when calling “results = bq_client.query(sql)” in /panoptes/utils/

“Google. The auth. Exceptions. RefreshError: (’ invalid_grant: Invalid grant: account not found ’, {” error” : ‘invalid_grant’, ‘error_description’: ‘Invalid Grant: Account not found’})”

where the parameter sql in bq_client.query(sql) is
“SELECT id as picid, gaia as gaia, ra as catalog_ra, dec as catalog_dec, vmag as catalog_vmag, vmag_partition as catalog_vmag_bin, e_vmag as catalog_vmag_err, tmag as catalog_tmag, e_tmag as catalog_tmag_err, gaiamag as catalog_gaiamag, e_gaiamag as catalog_gaiamag_err, gaiabp as catalog_gaiabp_err, e_gaiabp as catalog_gaiabp, gaiarp as catalog_gaiarp_err, e_gaiarp as catalog_gaiarp, numcont as catalog_numcont, contratio as catalog_contratio
FROM catalog.pic
(dec >= -15.0 AND dec <= 5.0) AND
(RA >= 61.0 AND RA <= 101.0) AND
(vmag_partition BETWEEN 6 AND 12)

When I debug, I find that the possible reason is that my BigQuery SQL workspace needs to have the file “catalog.pic”. But I don’t have this catalog. Do anybody know how to solve it? Thanks!

Note1. When I run processFits.ipynb, I change the parameter “fits_path” to my own Google Cloud bucket “”. This file is downloaded from “SEARCH_OBSERVATIONS (BY_NAME = ‘M42’)“. pnptbuck is my bucket name.

Note2. I have set ‘os.environ[“GOOGLE_APPLICATION_CREDENTIALS”]=“/Users/superman/pantoptes/pantoptes-8aa11c642fc7.json” ‘ which is my own Google Cloud bucket json.