Skip to content
This repository has been archived by the owner on Aug 10, 2023. It is now read-only.

Unknown encoding gpt2 when run as execute under windows #1009

Answered by shirubei
shirubei asked this question in Q&A
Discussion options

You must be logged in to vote

I have solved it using methods below:
1.Add --hidden-import=tiktoken_ext.openai_public --hidden-import=tiktoken_ext when you use pyinstaller to make it executable.
2.delete the code with open(os.path.join(_SCRIPT_DIR, "VERSION")) as _version_file: version = _version_file.read().strip() in module "blobfile" init.py

After thses stpes, ran into another error 'Could not find module 'C:\Users{MYNAME}\AppData\Local\Temp_MEI160522\tls_client\dependencies\tls-client-64.dll'.

I created a dir named dll and put tls-client-64.dll in it, then added option below and finally solved the problem.
--add-binary "dll\tls-client-64.dll;tls_client/dependencies"

(openai/tiktoken#43)

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by shirubei
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant