Traceback (most recent call last): File "/Users/xxz/miniforge3/envs/crypto_pred_312/lib/python3.12/site-packages/pandas/core/indexes/base.py", line 3641, in get_loc return self._engine.get_loc(casted_key) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "pandas/_libs/index.pyx", line 168, in pandas._libs.index.IndexEngine.get_loc File "pandas/_libs/index.pyx", line 197, in pandas._libs.index.IndexEngine.get_loc File "pandas/_libs/hashtable_class_helper.pxi", line 7668, in pandas._libs.hashtable.PyObjectHashTable.get_item File "pandas/_libs/hashtable_class_helper.pxi", line 7676, in pandas._libs.hashtable.PyObjectHashTable.get_item KeyError: 'BBU_20_2.0' The above exception was the direct cause of the following exception: Traceback (most recent call last): File "/Users/xxz/PycharmProjects/crypto_predictor/train_dlinear_real.py", line 163, in main() File "/Users/xxz/PycharmProjects/crypto_predictor/train_dlinear_real.py", line 30, in main X, y, processed_df = preprocessor.preprocess_pipeline(df, task='classification', fit=True) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/xxz/PycharmProjects/crypto_predictor/data/preprocessor.py", line 225, in preprocess_pipeline df = self.add_technical_indicators(df) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/xxz/PycharmProjects/crypto_predictor/data/preprocessor.py", line 58, in add_technical_indicators df['bb_upper'] = bbands['BBU_20_2.0'] ~~~~~~^^^^^^^^^^^^^^ File "/Users/xxz/miniforge3/envs/crypto_pred_312/lib/python3.12/site-packages/pandas/core/frame.py", line 4378, in __getitem__ indexer = self.columns.get_loc(key) ^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/xxz/miniforge3/envs/crypto_pred_312/lib/python3.12/site-packages/pandas/core/indexes/base.py", line 3648, in get_loc raise KeyError(key) from err KeyError: 'BBU_20_2.0' ERROR conda.cli.main_run:execute(127): `conda run python train_dlinear_real.py` failed. (See above for error) ================================================================================ DLinear模型训练 - 真实Binance数据 ================================================================================ [1/7] 从Binance获取BTC 1h真实数据... ✓ 使用SOCKS5代理: socks5://127.0.0.1:7890 ✓ 已成功连接到Binance API 从缓存加载数据:data/cache/BTC_1h_1y_now.csv ✓ 已获取 8760 行真实数据 ✓ 时间范围:2025-01-28 15:00:00 至 2026-01-28 14:00:00 [2/7] 数据预处理(技术指标 + 特征工程)...