Fixes "AttributeError: 'FileNotFoundError' object has no attribute read" See https://stackoverflow.com/a/68586065/3536518