PaddlePaddle / PaddleSpeech

Easy-to-use Speech Toolkit including Self-Supervised Learning model, SOTA/Streaming ASR with punctuation, Streaming TTS with text frontend, Speaker Verification System, End-to-End Speech Translation and Keyword Spotting. Won NAACL2022 Best Demo Award.
https://paddlespeech.readthedocs.io
Apache License 2.0
11.19k stars 1.86k forks source link

遇到了循环引用的问题ImportError: cannot import name 'CommonTaskResource' from partially initialized module 'paddlespeech.resource' (most likely due to a circular import) (D:\Onedrive\Study\postgraduate\project\KongTianYuan\PaddleSpeech\paddlespeech\resource\__init__.py) #3406

Open 2625009538 opened 1 year ago

2625009538 commented 1 year ago

D:\Anaconda\envs\kty_paddle\python.exe D:\Onedrive\Study\postgraduate\project\KongTianYuan\PaddleSpeech\paddle.py Traceback (most recent call last): File "D:\Onedrive\Study\postgraduate\project\KongTianYuan\PaddleSpeech\paddle.py", line 14, in from paddlespeech.cli.asr.infer import ASRExecutor File "D:\Onedrive\Study\postgraduate\project\KongTianYuan\PaddleSpeech\paddlespeech\cli__init.py", line 16, in from .base_commands import BaseCommand File "D:\Onedrive\Study\postgraduate\project\KongTianYuan\PaddleSpeech\paddlespeech\cli\base_commands.py", line 20, in from ..resource import CommonTaskResource File "D:\Onedrive\Study\postgraduate\project\KongTianYuan\PaddleSpeech\paddlespeech\resource\init.py", line 14, in from .resource import CommonTaskResource File "D:\Onedrive\Study\postgraduate\project\KongTianYuan\PaddleSpeech\paddlespeech\resource\resource.py", line 20, in from ..cli.utils import download_and_decompress File "D:\Onedrive\Study\postgraduate\project\KongTianYuan\PaddleSpeech\paddlespeech\cli\utils.py", line 26, in import paddle File "D:\Onedrive\Study\postgraduate\project\KongTianYuan\PaddleSpeech\paddle.py", line 14, in from paddlespeech.cli.asr.infer import ASRExecutor File "D:\Onedrive\Study\postgraduate\project\KongTianYuan\PaddleSpeech\paddlespeech\cli\asr\init.py", line 14, in from .infer import ASRExecutor File "D:\Onedrive\Study\postgraduate\project\KongTianYuan\PaddleSpeech\paddlespeech\cli\asr\infer.py", line 32, in from ..executor import BaseExecutor File "D:\Onedrive\Study\postgraduate\project\KongTianYuan\PaddleSpeech\paddlespeech\cli\executor.py", line 27, in from ..resource import CommonTaskResource ImportError: cannot import name 'CommonTaskResource' from partially initialized module 'paddlespeech.resource' (most likely due to a circular import) (D:\Onedrive\Study\postgraduate\project\KongTianYuan\PaddleSpeech\paddlespeech\resource\init__.py)

Process finished with exit code 1

zxcd commented 1 year ago

你在跑什么,是否存在两个python文件互相引用的情况?

stale[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.