Pyinstaller packages the EXE file and executes the error unknown encoding: IDNA

I wrote a script and wanted to package it into an EXE file. It runs normally in the python compiler, but when packaged into an. EXE file, an error is reported. Lookuperror: unknown encoding: IDNA

Solution:
just import this module at the beginning of the script. This may be a coding problem. There is no in-depth study. Just solve it
Import encodings.idna

Read More: