这是indexloc提供的服务,不要输入任何密码
Skip to content

ImportError: cannot import name 'Token' from 'prompt_toolkit.token' #32

@rahiminabdulamin

Description

@rahiminabdulamin

After getting yarn setup successfully (after a lot of troubleshooting by installing missing dependencies and other things), here is an error I got when proceeding to run python main.py from collector folder:

(my-venv) PS C:\Users\rahim\OneDrive\Desktop\TEST\anything-llm\collector> python main.py
Traceback (most recent call last):
  File "C:\Users\rahim\OneDrive\Desktop\TEST\anything-llm\collector\main.py", line 2, in <module>
    from whaaaaat import prompt, Separator
  File "C:\Users\rahim\OneDrive\Desktop\TEST\anything-llm\my-venv\lib\site-packages\whaaaaat\__init__.py", line 6, in <module>
    from prompt_toolkit.token import Token
ImportError: cannot import name 'Token' from 'prompt_toolkit.token' (C:\Users\rahim\OneDrive\Desktop\TEST\anything-llm\my-venv\lib\site-packages\prompt_toolkit\token.py)

When I opened up the token.py script mentioned in the error, this is what it looks like for me:

"""
"""

from __future__ import annotations

__all__ = [
    "ZeroWidthEscape",
]

ZeroWidthEscape = "[ZeroWidthEscape]"

I'm stumped by this stage and can't self-troubleshoot any further. I'm running on Windows 10. Please help. Any ideas to resolve this?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions