Unrecognized potential number 6 in GetPot

A rather silly error in Gaussian, but one that seems to be common and to which I haven’t found any posted solutions, so here goes mine. This error shows up when reading an external basis set and looks like this (color emphasis mine):

 Rotational constants (GHZ):           0.0492351           0.0073969           0.0065324
 Leave Link  202 at Tue Sep 30 16:14:43 2025, MaxMem=   104857600 cpu:               1.5 elap:               0.2
 (Enter /tmpu/scunam/7/gaussian-2016.C01/g1/g16/l301.exe)
 General basis read from cards:  (5D, 7F)
 ======================================================================================================
                                       Pseudopotential Parameters
 ======================================================================================================
  Center     Atomic      Valence      Angular      Power
  Number     Number     Electrons     Momentum     of R      Exponent        Coefficient   SO-Coeffient
 ======================================================================================================
 Unrecognized potential number           6 in GetPot.
 Error termination via Lnk1e in /tmpu/scunam/7/gaussian-2016.C01/g1/g16/l301.exe at Tue Sep 30 16:14:43 2025.
 Job cpu time:       0 days  0 hours  0 minutes  8.3 seconds.
 Elapsed time:       0 days  0 hours  0 minutes  1.1 seconds.
 File lengths (MBytes):  RWF=     14 Int=      0 D2E=      0 Chk=      1 Scr=      1

When using the gen keyword to add an external basis set or to define different basis sets to different kinds of atoms, this error shows up if there are two blank lines between the end of the molecular specification and the actual basis set, but it also shows up if the number of lines in the connectivity matrix is different to the number of atoms.

This difference may stem from the editing of the input file, for instance, if you get the molecular coordinates from a .cif file and you had to remove some pseudo atoms which came from the molecular disorder in the crystal. The connectivity matrix will assign a connectivity scheme to all atoms, including those that are spurious. So if you delete the lines corresponding to the cartesian coordinates of spurious atoms–sometimes labeled with a question mark instead of an atomic symbol (?)–make sure you also delete the corresponding line within the connectivity matrix.

I hope this helps.