Today I saw repeating lines of “Empty file I belive” appearing in the console of my Sublime Text 4. I googled and was led here because of the very idiosyncratic typo “belive”. I investigated and figured out it was from my newly installed (and not yet configured) OpenAI completion plugin. To be exact, it was from the current line 91 of OpenAI completion/plugins/cacher.py
.
def read_model(self) -> Dict[str, Any] | None:
self.check_and_create(self.current_model_file)
with open(self.current_model_file, 'r') as file:
try:
data: Dict[str, Any] | None = json.load(file)
except JSONDecodeError:
# TODO: Handle this state, but keep in mind
# that it's completely legal to being a file empty for some (yet unspecified) state
print('Empty file I belive')
return None
return data
See https://github.com/yaroslavyaroslav/OpenAI-sublime-text/blob/255c8d39fa42703d64a665d55a0689e0f49d07c7/plugins/cacher.py#L91
Now this cacher.py
(already gone from the current develop
branch HEAD) seems to be another plugin used by the OpenAI completion plugin, but I am not sure where it comes from.
For friends who encountered the same problem, I hope this does a little help.
By the way, I earnestly advocate that, in Sublime Text plugin development, any log from any plugin - please tell us where you are from, e.g. OpenAI completion/cacher: Empty file I belive
.