FinRL-Tutorials icon indicating copy to clipboard operation
FinRL-Tutorials copied to clipboard

FinRL-Tutorials/1-Introduction/China_A_share_market_tushare.py

Open xiahuadong1981 opened this issue 5 months ago • 0 comments

import sys; print('Python %s on %s' % (sys.version, sys.platform)) 已连接到 pydev 调试器(内部版本号 243.25659.43)/home/xiahuadong/anaconda3/envs/FinRL-Tutorials/bin/python -X pycache_prefix=/home/xiahuadong/.cache/JetBrains/PyCharm2024.3/cpython-cache /home/xiahuadong/下载/pycharm-professional-2024.3.4/pycharm-2024.3.4/plugins/python-ce/helpers/pydev/pydevd.py --multiprocess --qt-support=auto --client 127.0.0.1 --port 44995 --file /media/xiahuadong/蓝色希捷5T/Desktop/Codes/FinRL-Tutorials/1-Introduction/China_A_share_market_tushare.py /home/xiahuadong/下载/pycharm-professional-2024.3.4/pycharm-2024.3.4/plugins/python-ce/helpers/pydev/pydevd_plugins/init.py:2: UserWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html. The pkg_resources package is slated for removal as early as 2025-11-30. Refrain from using this package or pin to Setuptools<81. ALL Modules have been imported! tushare is NOT supported yet. Traceback (most recent call last): File "/media/xiahuadong/蓝色希捷5T/Desktop/Codes/FinRL-Meta/meta/data_processor.py", line 87, in init self.processor = processor_dict.get(self.data_source)( UnboundLocalError: local variable 'processor_dict' referenced before assignment During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/xiahuadong/下载/pycharm-professional-2024.3.4/pycharm-2024.3.4/plugins/python-ce/helpers/pydev/pydevd.py", line 1570, in _exec pydev_imports.execfile(file, globals, locals) # execute the script File "/home/xiahuadong/下载/pycharm-professional-2024.3.4/pycharm-2024.3.4/plugins/python-ce/helpers/pydev/_pydev_imps/_pydev_execfile.py", line 18, in execfile exec(compile(contents+"\n", file, 'exec'), glob, loc) File "/media/xiahuadong/蓝色希捷5T/Desktop/Codes/FinRL-Tutorials/1-Introduction/China_A_share_market_tushare.py", line 148, in p = DataProcessor( File "/media/xiahuadong/蓝色希捷5T/Desktop/Codes/FinRL-Meta/meta/data_processor.py", line 92, in init raise ValueError( ValueError: Please input correct account info for tushare! python-BaseException

是不是应该代码改成: FinRL-Meta/meta/data_processor.py

elif self.data_source == DataSource.tushare.value: from meta.data_processors.tushare import Tushare

xiahuadong1981 avatar Aug 13 '25 14:08 xiahuadong1981