Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

module 'app.services.task' has no attribute 'start' #99

Open
weifuqiang007 opened this issue Jan 19, 2025 · 1 comment
Open

module 'app.services.task' has no attribute 'start' #99

weifuqiang007 opened this issue Jan 19, 2025 · 1 comment

Comments

@weifuqiang007
Copy link

E:\narrato\NarratoAI\venv\Scripts\python.exe E:\narrato\NarratoAI\main.py
2025-01-19 23:01:20.146 | INFO | app.config.config:load_config:22 - load config from file: E:\narrato\NarratoAI/config.toml
2025-01-19 23:01:20.169 | INFO | app.config.config::71 - NarratoAI v0.3.9
�Ҳ����ļ�
2025-01-19 23:01:22 | INFO | "./main.py:8": - start server, docs: http://127.0.0.1:8080/docs
E:\narrato\NarratoAI\venv\Lib\site-packages\pydub\utils.py:170: RuntimeWarning: Couldn't find ffmpeg or avconv - defaulting to ffmpeg, but may not work
warn("Couldn't find ffmpeg or avconv - defaulting to ffmpeg, but may not work", RuntimeWarning)
Traceback (most recent call last):
File "E:\narrato\NarratoAI\main.py", line 13, in
uvicorn.run(
File "E:\narrato\NarratoAI\venv\Lib\site-packages\uvicorn\main.py", line 587, in run
server.run()
File "E:\narrato\NarratoAI\venv\Lib\site-packages\uvicorn\server.py", line 62, in run
return asyncio.run(self.serve(sockets=sockets))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\tools\tools\envs\narrato\Lib\asyncio\runners.py", line 194, in run
return runner.run(main)
^^^^^^^^^^^^^^^^
File "D:\tools\tools\envs\narrato\Lib\asyncio\runners.py", line 118, in run
return self.loop.run_until_complete(task)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\tools\tools\envs\narrato\Lib\asyncio\base_events.py", line 686, in run_until_complete
return future.result()
^^^^^^^^^^^^^^^
File "E:\narrato\NarratoAI\venv\Lib\site-packages\uvicorn\server.py", line 69, in serve
config.load()
File "E:\narrato\NarratoAI\venv\Lib\site-packages\uvicorn\config.py", line 458, in load
self.loaded_app = import_from_string(self.app)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "E:\narrato\NarratoAI\venv\Lib\site-packages\uvicorn\importer.py", line 21, in import_from_string
module = importlib.import_module(module_str)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\tools\tools\envs\narrato\Lib\importlib_init
.py", line 90, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "", line 1387, in _gcd_import
File "", line 1360, in _find_and_load
File "", line 1331, in _find_and_load_unlocked
File "", line 935, in _load_unlocked
File "", line 999, in exec_module
File "", line 488, in _call_with_frames_removed
File "E:\narrato\NarratoAI\app\asgi.py", line 14, in
from app.router import root_api_router
File "E:\narrato\NarratoAI\app\router.py", line 12, in
from app.controllers.v1 import llm, video
File "E:\narrato\NarratoAI\app\controllers\v1\video.py", line 15, in
from app.controllers.manager.redis_manager import RedisTaskManager
File "E:\narrato\NarratoAI\app\controllers\manager\redis_manager.py", line 11, in
"start": tm.start,
^^^^^^^^
AttributeError: module 'app.services.task' has no attribute 'start'

解释器报错说task这个文件中没有start的方法。我着了一下确实没有欸。
是不是代码版本的问题

@2033723741
Copy link

redis_manager.py line11 改成下面这样:
FUNC_MAP = {
"start": tm.start_subclip,
# 'start_test': tm.start_test
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants