When running a predictive model in Analytics, an error "Error: Invalid Predictors: Only one unique value." is displayed

When running a supervised learning model (e.g., Linear Regression, Logistic Regression, Decision Tree, Random Forest, etc.) in Analytics, you may encounter the following error:

Error: Invalid Predictors: Only one unique value.

This occurs when the column specified as an explanatory variable contains only one unique value.

If you encounter this error, check if any of the variables you are using have only one unique value, then remove that column or re-select the optimal explanatory variable columns.