Operating System: Windows 10
Python Version: 3.7.2
PyInstaller Version: 3.4
This is a fairly annoying error without much information to go by. But luckily for us, a responsible coder has provided a solution to this.
The solution lies in making changes to the file bindepend.py in the Project Folder
<ProjectName>/venv/lib/python3.7/Pyinstaller/depend/bindepend.py
Rename the existing file to bindepend_old.py and replace this file with the one available on GitHub as provided below.
Converting to exe using PyInstaller should work perfectly now.
Let me know how you fared.