TypeError: expected str, bytes or os.PathLike object, not NoneType

created at 12-12-2021 views: 215

error

An error is reported when the py file is packaged into an exe file

TypeError: expected str, bytes or os.PathLike object, not NoneType

reason

After consulting, I finally got the reason. The bindepend.py file under the Pyinstaller package has a bug and needs to be replaced.

solution

1. Download the repaired pyinstaller package on github: link

github

2. Find the script bindepend.py

Find the script

3. Find the previously downloaded pyinstaller package with bugs, and replace the bindepend.py in it
After running again, it will show success

created at:12-12-2021
edited at: 12-12-2021: