open-interpreter
open-interpreter copied to clipboard
Fix: NameError: name 'computer' is not defined
Describe the changes you have made:
The run method in the Terminal class is a generator function that executes some code and yields the results one at a time. In a previous commit, the for loop was removed that was used to iterate over these results, which caused the run method to not actually be executed because its results were not being consumed. This commit adds the for loop back to ensure that the run method is properly executed.
Reference any relevant issues (e.g. "Fixes #000"):
https://github.com/KillianLucas/open-interpreter/issues/875
Pre-Submission Checklist (optional but appreciated):
- [x] I have included relevant documentation updates (stored in /docs)
- [x] I have read
docs/CONTRIBUTING.md - [x] I have read
docs/ROADMAP.md
OS Tests (optional but appreciated):
- [ ] Tested on Windows
- [x] Tested on MacOS
- [ ] Tested on Linux
Traceback (most recent call last):
File "
Added a quick fix, just putting stream=True
Thanks @Arrendy! And thanks @Notnaton for working on this as well! This was totally a mistake I made, luckily committed after the last version that went out to pip, so just a problem for us working off the repo.
Renaming it to run is exactly how it ought to work— if stream=False, we just pull from an identical run with stream=True and return that output. Merging!