Skip to content

Database is locked error #675

Closed as not planned
Closed as not planned
@balakreshnan

Description

user_proxy (to assistant):

Who should read this paper: https://arxiv.org/abs/2308.08155



OperationalError Traceback (most recent call last)
Cell In[14], line 2
1 # the assistant receives a message from the user, which contains the task description
----> 2 user_proxy.initiate_chat(
3 assistant,
4 message="""
5 Who should read this paper: https://arxiv.org/abs/2308.08155
6 """,
7 )

File /anaconda/envs/azureml_py310_sdkv2/lib/python3.10/site-packages/autogen/agentchat/conversable_agent.py:531, in ConversableAgent.initiate_chat(self, recipient, clear_history, silent, **context)
517 """Initiate a chat with the recipient agent.
518
519 Reset the consecutive auto reply counter.
(...)
528 "message" needs to be provided if the generate_init_message method is not overridden.
529 """
530 self._prepare_chat(recipient, clear_history)
--> 531 self.send(self.generate_init_message(**context), recipient, silent=silent)

File /anaconda/envs/azureml_py310_sdkv2/lib/python3.10/site-packages/autogen/agentchat/conversable_agent.py:334, in ConversableAgent.send(self, message, recipient, request_reply, silent)
332 valid = self._append_oai_message(message, "assistant", recipient)
333 if valid:
--> 334 recipient.receive(message, self, request_reply, silent)
335 else:
336 raise ValueError(
337 "Message can't be converted into a valid ChatCompletion message. Either content or function_call must be provided."
338 )

File /anaconda/envs/azureml_py310_sdkv2/lib/python3.10/site-packages/autogen/agentchat/conversable_agent.py:462, in ConversableAgent.receive(self, message, sender, request_reply, silent)
460 if request_reply is False or request_reply is None and self.reply_at_receive[sender] is False:
461 return
--> 462 reply = self.generate_reply(messages=self.chat_messages[sender], sender=sender)
463 if reply is not None:
464 self.send(reply, sender, silent=silent)

File /anaconda/envs/azureml_py310_sdkv2/lib/python3.10/site-packages/autogen/agentchat/conversable_agent.py:781, in ConversableAgent.generate_reply(self, messages, sender, exclude)
779 continue
780 if self._match_trigger(reply_func_tuple["trigger"], sender):
--> 781 final, reply = reply_func(self, messages=messages, sender=sender, config=reply_func_tuple["config"])
782 if final:
783 return reply

File /anaconda/envs/azureml_py310_sdkv2/lib/python3.10/site-packages/autogen/agentchat/conversable_agent.py:606, in ConversableAgent.generate_oai_reply(self, messages, sender, config)
603 messages = self._oai_messages[sender]
605 # TODO: #1143 handle token limit exceeded error
--> 606 response = oai.ChatCompletion.create(
607 context=messages[-1].pop("context", None), messages=self._oai_system_message + messages, **llm_config
608 )
609 return True, oai.ChatCompletion.extract_text_or_function_call(response)[0]

File /anaconda/envs/azureml_py310_sdkv2/lib/python3.10/site-packages/autogen/oai/completion.py:803, in Completion.create(cls, context, use_cache, config_list, filter_func, raise_on_ratelimit_or_timeout, allow_format_str_template, **config)
801 base_config["max_retry_period"] = 0
802 try:
--> 803 response = cls.create(
804 context,
805 use_cache,
806 raise_on_ratelimit_or_timeout=i < last or raise_on_ratelimit_or_timeout,
807 **base_config,
808 )
809 if response == -1:
810 return response

File /anaconda/envs/azureml_py310_sdkv2/lib/python3.10/site-packages/autogen/oai/completion.py:832, in Completion.create(cls, context, use_cache, config_list, filter_func, raise_on_ratelimit_or_timeout, allow_format_str_template, **config)
830 if "seed" in params:
831 cls.set_cache(params.pop("seed"))
--> 832 with diskcache.Cache(cls.cache_path) as cls._cache:
833 cls.set_cache(seed)
834 return cls._get_response(params, raise_on_ratelimit_or_timeout=raise_on_ratelimit_or_timeout)

File /anaconda/envs/azureml_py310_sdkv2/lib/python3.10/site-packages/diskcache/core.py:478, in Cache.init(self, directory, timeout, disk, **settings)
476 for key, value in sorted(sets.items()):
477 if key.startswith('sqlite_'):
--> 478 self.reset(key, value, update=False)
480 sql(
481 'CREATE TABLE IF NOT EXISTS Settings ('
482 ' key TEXT NOT NULL UNIQUE,'
483 ' value)'
484 )
486 # Setup Disk object (must happen after settings initialized).

File /anaconda/envs/azureml_py310_sdkv2/lib/python3.10/site-packages/diskcache/core.py:2438, in Cache.reset(self, key, value, update)
2436 update = True
2437 if update:
-> 2438 sql('PRAGMA %s = %s' % (pragma, value)).fetchall()
2439 break
2440 except sqlite3.OperationalError as exc:

OperationalError: database is locked

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    0.2Issues which are related to the pre 0.4 codebase

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions