-
-
Notifications
You must be signed in to change notification settings - Fork 56
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix missing 1 required positional argument bug & sqlite3.operationalerror: database is locked issue #78
base: main
Are you sure you want to change the base?
Conversation
Trinity-SYT-SECURITY
commented
Aug 6, 2024
|
||
def perform_round(self, turn:int) -> bool: | ||
got_root : bool = False | ||
def perform_round(self, turn: int) -> bool:##fix code |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please remove the comment
self.log_db.add_log_query(self._run_id, turn, cmd, result, answer) | ||
self._sliding_history.add_command(cmd, result) | ||
self.console.print(Panel(result, title=f"[bold cyan]{cmd}")) | ||
#self.log_db.add_log_query(self._run_id, cmd, result, answer) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this looks wrong, wouldn't this only call test_credentials and not execute_command anymore?
def connect(self): | ||
self.db = sqlite3.connect(self.connection_string) | ||
# self.db = sqlite3.connect(self.connection_string, timeout=10) # Set timeout to 10 seconds | ||
self.db = sqlite3.connect(self.connection_string, check_same_thread=False, timeout=10) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is weird. I am trying to understand the error case. Are you running two instances of hackingBuddyGPT in parallel? This would not be supported by the sqlite3 database (that we are currently using). I think the clean solution would rather be to use a separate sqlite database per run (using the log_db
parameter) or using a database such as postgres/mysql that supports concurrent access