1👍
For anyone else who finds this problem…
This TypeError
can occur when PIL and Pillow are installed simultaneously (perhaps inadvertently due to hidden package requirements). You’ll need to uninstall both PIL and Pillow and reinstall just the one you want.
Source:stackexchange.com