Archon with local Postgresql Error

Hello,

I encountered an error when attempting to clear Pydantic docs from the database.
Here is the code:

asyncio.run(clear_existing_records())

Error is:

archon/streamlit_ui.py:629: RuntimeWarning: coroutine ‘clear_existing_records’ was never awaited
st.error(f":x: Error clearing Pydantic AI docs: {str(e)}")
:x: Error clearing Pydantic AI docs: asyncio.run() cannot be called from a running event loop

Some background information (may not have any bearing on the above error). I had originally taken the WebCrawler project in ottomator-agents and updated it to work with my local postgresql database instance. Due to this I already have a set of records for pydantic ai. I made the same updates to Archon and am able to see that yes the table already exists and I can query the data using the “View Indexed Data” button.

1 Like

Thanks for letting me know about this @xactant, I will take a look! Think you could make a GitHub issue as well?

In the meantime, if you just crawl the Pydantic AI docs again within the “Documentation” tab, it’ll clear the table first so you don’t need to run the clean up through this button anyway!

1 Like

Will do. I am able to run the app with my older data without clearing the data.

1 Like

Good to know. Saw your issue come through as well, thanks for doing that!