Skip to content

Conversation

@Trinity-SYT-SECURITY
Copy link

image

@Trinity-SYT-SECURITY Trinity-SYT-SECURITY changed the title fix missing 1 required positional argument bug fix missing 1 required positional argument bug & sqlite3.operationalerror: database is locked issue Aug 6, 2024

def perform_round(self, turn:int) -> bool:
got_root : bool = False
def perform_round(self, turn: int) -> bool:##fix code
Copy link
Member

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)
Copy link
Member

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)
Copy link
Member

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

@Neverbolt
Copy link
Collaborator

This should all be handled in #79

@Neverbolt Neverbolt closed this Dec 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants