The measurement error (ME) of smart meters (SMs) is a key index for assessing their performance, so accurate prediction of SMs' ME is essential. However, SMs operate in all parts of the world, and the factors that impact the SMs' ME differ across regions. Therefore, we propose a novel and general framework to predict the SMs' ME. Firstly, we study the influence of environment stress on SMs' ME by the Pearson correlation coefficient (PCC) and Least squares method (LSM), select the environment stresses that have a greater impact on SMs' ME, and clean those environment data and SMs' ME data by the Isolated Forest and Local Outlier Factor algorithm (IFLOF). Subsequently, a new method based on the Heap-Based Optimizer of Bi-directional Long Short-Term Memory network (HBO-BiLSTM) is proposed to predict the SMs' ME. To illustrate the framework we proposed, the framework is compared with some well-known machine learning methods with field data collected from the high altitude regions, the results indicated that the framework has excellent prediction ability, which can provide technical support for health management of SMs in typical regions.