code: def doSolve(fitsfn: Path, args: str=None):
      
      # binpath = Path(find_executable('solve-field')).parent
      opts = args.split(' ') if args else []
  # %% build command
      cmd = ['solve-field', '--overwrite', str(fitsfn)]
      cmd += opts
      print('\n', ' '.join(cmd), '\n')
  # %% execute
      ret = subprocess.check_output(cmd, universal_newlines=True)
  
      # solve-field returns 0 even if it didn't solve!
      print(ret)
      if 'Did not solve' in ret:
          raise RuntimeError(f'could not solve {fitsfn}')
  
      print('\n\n *** done with astrometry.net ***\n ')
docs: Astrometry.net from at least version 0.67 is OK with Python 3.