I get the same problem. In my case, i found "pycache" folder inside my project, then i deleted it. After that, i ran auto-py-to-exe again and it worked.
Check your code again, all imported libraries are working well, then try the second way:
copy your python file to other folder
Open a command prompt or terminal to navigate your script’s directory: cd path\to\your\script
Run pysinstaller: pyinstaller --onefile your_script.py