sean1832/SumGPT

[BUG]Can't Launch the repo:unsupported operand type(s) for |: '_GenericAlias' and 'type'

WRTY1 opened this issue · 3 comments

WRTY1 commented

Describe the bug
启动RUN.bat脚本后

To Reproduce

发生异常: TypeError
unsupported operand type(s) for |: '_GenericAlias' and 'type'
  File "E:\github\SumGPT\src\GPT\misc.py", line 48, in <module>
    def predict_token_single(chunk: Dict[str, Union[str, float]] | str, max_tokens: int = None) -> int:

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
image

Envrionment (please complete the following information):

  • Web or Local: local
  • Version: [e.g. 0.6.1]
  • OS: WIndows11
  • Browser chrome

Hi, there might be some bugs in older version of the repo. If you are still having problem, I suggest you download the newest release (1.0.8) of the program which can be found here, or you can simply use the web app.
If your problem still persist, please report the bug here again, thanks.

WRTY1 commented

I solved it by downloading a new repository. By comparing the two repositories, I discovered that the bug was likely caused by the venv. In the previous venv, there were only a few packages, while the new one had a complete set. Essentially, the issue arose from using outdated versions of packages.

That might be the reason. Earlier versions consist a lot of bugs, the newer version should be more stable.