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

SyntaxError: 'await' outside function when running quickstart #137

Closed
rxmao opened this issue Dec 3, 2024 · 6 comments
Closed

SyntaxError: 'await' outside function when running quickstart #137

rxmao opened this issue Dec 3, 2024 · 6 comments
Assignees

Comments

@rxmao
Copy link

rxmao commented Dec 3, 2024

运行docs/tutorials/chat-on-tabular-data.ipynb报错SyntaxError: 'await' outside function

@edwardzjl
Copy link
Contributor

文档是用 jupyter notebook 写的,你可以在 jupyter 中一个单元格一个单元格的运行。请问你是怎么运行这个例子的?
另外,issue 的标题指的是分析图表的任务?

@rxmao
Copy link
Author

rxmao commented Dec 4, 2024

jupyter 中运行chat-on-tabular-data.ipynb的时候, 一个单元格一个单元格的运行,也是各种错误:
一个单元格一个单元格的运行:
NameError Traceback (most recent call last)
Cell In[2], line 6
2 from tablegpt.agent import create_tablegpt_graph
3 checkpointer = MemorySaver()
4 agent = create_tablegpt_graph(
5 llm="TableGPT2-7B",
----> 6 pybox_manager=pybox_manager,
7 checkpointer=checkpointer,
8 session_id="some-session-id", # This is required when using file-reading
9 )

NameError: name 'pybox_manager' is not defined

主要想先分析excel

@edwardzjl
Copy link
Contributor

看起来是 chat-on-tabular-data 的文档不够完善,初始化的部分有所缺失 @vegetablest

@vegetablest
Copy link
Contributor

vegetablest commented Dec 4, 2024

@rxmao 抱歉因为文档的提醒缺失给您带来麻烦,如果您是在notebook中运行,请先阅读并执行Quickstartchat-on-tabular-data是在qucikstart的基础上进行深入的,确保chat-on-tabular-dataquickstart处于同一个内核中执行。当然您也可以参照qucikstart部分重新创建pybox_manager.

@vegetablest
Copy link
Contributor

vegetablest commented Dec 4, 2024

运行docs/tutorials/chat-on-tabular-data.ipynb报错SyntaxError: 'await' outside function

@rxmao 如果您想使用终端执行,可以通过python -m asyncio启动支持异步操作的python终端。

NOTE 2: TableGPT Agent fully supports aync invocation. To start a Python console that supports asynchronous operations, run the following command:

python -m asyncio

@rxmao
Copy link
Author

rxmao commented Dec 5, 2024

谢谢,已经搞定

@rxmao rxmao closed this as completed Dec 5, 2024
@edwardzjl edwardzjl changed the title 求问有解析图表的示例代码吗? SyntaxError: 'await' outside function when running quickstart Dec 6, 2024
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

3 participants