AgentVerse icon indicating copy to clipboard operation
AgentVerse copied to clipboard

Cannot launch CLI example: SyntaxError: 'async with' outside async function

Open wenjie-lu opened this issue 1 year ago • 5 comments

I did a clean installation of the repo following the instruction provided. However, when I ran the first CLI example, agentverse-simulation --task simulation/nlp_classroom_9players, I got the following error:

  File "/Users/x/code/AgentVerse/agentverse_command/main_simulation_cli.py", line 5, in <module>
    from agentverse.logging import logger
  File "/Users/x/code/AgentVerse/agentverse/__init__.py", line 1, in <module>
    from .output_parser import output_parser_registry
  File "/Users/x/code/AgentVerse/agentverse/output_parser/__init__.py", line 5, in <module>
    from .output_parser import *
  File "/Users/x/code/AgentVerse/agentverse/output_parser/output_parser.py", line 12, in <module>
    from agentverse.llms import LLMResult
  File "/Users/x/code/AgentVerse/agentverse/llms/__init__.py", line 41, in <module>
    from .openai import OpenAIChat
  File "/Users/x/code/AgentVerse/agentverse/llms/openai.py", line 235
    async with async_openai_client:
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
SyntaxError: 'async with' outside async function

OS: MacOS Python version: 3.10.14

wenjie-lu avatar May 15 '24 20:05 wenjie-lu

same problem ,hot to solve this ?

1ngram24 avatar May 16 '24 02:05 1ngram24

just created a temp patch for this issue

Lucas-TY avatar May 16 '24 07:05 Lucas-TY

刚刚为这个问题创建了一个临时补丁

it works, thank you so much!

641217688tly avatar May 26 '24 05:05 641217688tly

I still have this problem. OS: Win10, Python version: 3.10.14 How to solve this problem?

dslwz2008 avatar Sep 06 '24 23:09 dslwz2008

hello  do you still have problem? I find this email now  

坤坤 @.***

 

------------------ 原始邮件 ------------------ 发件人: @.>; 发送时间: 2024年9月7日(星期六) 上午7:36 收件人: @.>; 抄送: @.>; @.>; 主题: Re: [OpenBMB/AgentVerse] Cannot launch CLI example: SyntaxError: 'async with' outside async function (Issue #134)

I still have this problem. OS: Win10, Python version: 3.10.14 How to solve this problem?

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.***>

1ngram24 avatar Sep 19 '24 07:09 1ngram24