You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
NameError: name 'open' is not defined when llama-cpp-python cleaning up. #860
I reviewed the Discussions, and have a new bug or useful enhancement to share.
Expected Behavior
No Exceptions.
Current Behavior
At the end of inference:
Exception ignored in: <function Llama.__del__ at 0x7f38d140f010>
Traceback (most recent call last):
File "/home/ubuntu/.cache/pypoetry/virtualenvs/llm-gateway-NqZIJtg0-py3.10/lib/python3.10/site-packages/llama_cpp/llama.py", line 1655, in __del__
File "/home/ubuntu/.cache/pypoetry/virtualenvs/llm-gateway-NqZIJtg0-py3.10/lib/python3.10/site-packages/llama_cpp/utils.py", line 8, in __enter__
NameError: name 'open' is not defined
The issue was caused by some weird python behaviour inside of del methods. I'll include this in the next version which should be published sometime today.
Activity
abetlen commentedon Nov 2, 2023
The issue was caused by some weird python behaviour inside of del methods. I'll include this in the next version which should be published sometime today.
Fix name 'open' is not defined exception. Closes abetlen#860