Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

error using updatewcs

jdepasqualejdepasquale Member, Institute_Staff Posts: 4
I'm running into an error with updatewcs where it seems to start running and then exits with a TypeError. I'm running this in an AstroConda python 3 environment, running stwcs v1.4.0. Any tips on how to proceed would be appreciated.

This is the error message:

---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
in ()
----> 1 updatewcs.updatewcs('*flc*.fits')

~/miniconda2/envs/astroconda3/lib/python3.6/site-packages/stwcs/updatewcs/__init__.py in updatewcs(input, vacorr, tddcorr, npolcorr, d2imcorr, checkfiles, verbose, use_db)
120 # Add any new astrometry solutions available from
121 # an accessible astrometry web-service
--> 122 astrometry.updateObs(f)
123
124 return files

~/miniconda2/envs/astroconda3/lib/python3.6/site-packages/stwcs/updatewcs/astrometry_utils.py in updateObs(self, obsname)
165 hdrnames = headerlet.get_headerlet_kw_names(fileobj, 'hdrname')
166
--> 167 headerlets, best_solution_id = self.getObservation(observationID)
168 if headerlets is None:
169 logger.warning("Problems getting solutions from database")

~/miniconda2/envs/astroconda3/lib/python3.6/site-packages/stwcs/updatewcs/astrometry_utils.py in getObservation(self, observationID)
325 serviceEndPoint = self.serviceLocation + \
326 'observation/read/' + observationID + \
--> 327 '?wcsname='+solutionID
328 r_solution = requests.get(serviceEndPoint, headers=headers)
329 if r_solution.status_code == requests.codes.ok:

TypeError: must be str, not NoneType
Tagged:

Comments

  • mack@stsci.edu[email protected] Member, Institute_Staff, Moderator_DrizzlePac Posts: 32
    There were updates to the software that now require an additional parameter.
    We are trying to document this more clearly to users:

    Try using this command and let us know if it solves the problem.

    updatewcs.updatewcs('*flc.fits', use_db=False)
  • jdepasqualejdepasquale Member, Institute_Staff Posts: 4
    Thanks, this did solve the problem.
  • mack@stsci.edu[email protected] Member, Institute_Staff, Moderator_DrizzlePac Posts: 32
    I reported this to the software developer and it turns out to have been a bug.
    A fix is in the works, so you shouldn't have to do this in the future.
Sign In or Register to comment.