fetch_posts.py failing with sqlite3.OperationalError, anyio.ClosedResourceError exceptions
Closed this issue · 0 comments
TinfoilSubmarine commented
Hi, was trying out and couldn't get past fetch_posts.py
. I'm getting this set of errors (I snipped the long list of duplicate anyio.ClosedResourceError
down to just 1):
Traceback (most recent call last):
File "/home/joel/repos/pleroma-ebooks/./fetch_posts.py", line 227, in <module>
main()
File "/home/joel/repos/pleroma-ebooks/./fetch_posts.py", line 221, in main
anyio.run(amain)
File "/home/joel/.local/lib/python3.9/site-packages/anyio/_core/_eventloop.py", line 56, in run
return asynclib.run(func, *args, **backend_options) # type: ignore
File "/home/joel/.local/lib/python3.9/site-packages/anyio/_backends/_asyncio.py", line 230, in run
return native_run(wrapper(), debug=debug)
File "/usr/lib/python3.9/asyncio/runners.py", line 44, in run
return loop.run_until_complete(main)
File "/usr/lib/python3.9/asyncio/base_events.py", line 642, in run_until_complete
return future.result()
File "/home/joel/.local/lib/python3.9/site-packages/anyio/_backends/_asyncio.py", line 225, in wrapper
return await func(*args)
File "/home/joel/repos/pleroma-ebooks/./fetch_posts.py", line 210, in amain
async with PostFetcher(config=config) as fetcher: await fetcher.fetch_all()
File "/home/joel/repos/pleroma-ebooks/./fetch_posts.py", line 60, in fetch_all
tg.start_soon(self._do_account, acc)
File "/home/joel/.local/lib/python3.9/site-packages/anyio/_backends/_asyncio.py", line 562, in __aexit__
raise ExceptionGroup(exceptions)
anyio._backends._asyncio.ExceptionGroup: 19 exceptions were raised in the task group:
----------------------------
Traceback (most recent call last):
File "/home/joel/repos/pleroma-ebooks/./fetch_posts.py", line 72, in _do_account
tg.cancel_scope.cancel()
File "/home/joel/.local/lib/python3.9/site-packages/anyio/_backends/_asyncio.py", line 564, in __aexit__
raise exceptions[0]
File "/home/joel/repos/pleroma-ebooks/./fetch_posts.py", line 79, in _process_pages
await self._insert_activity(activity)
File "/home/joel/repos/pleroma-ebooks/./fetch_posts.py", line 101, in _insert_activity
await self._db.execute(
File "/home/joel/.local/lib/python3.9/site-packages/aiosqlite/core.py", line 184, in execute
cursor = await self._execute(self._conn.execute, sql, parameters)
File "/home/joel/.local/lib/python3.9/site-packages/aiosqlite/core.py", line 129, in _execute
return await future
File "/home/joel/.local/lib/python3.9/site-packages/aiosqlite/core.py", line 102, in run
result = function()
sqlite3.OperationalError: no such table: posts
----------------------------
Traceback (most recent call last):
File "/home/joel/repos/pleroma-ebooks/utils.py", line 10, in shielded
return await f(*args, **kwargs)
File "/home/joel/repos/pleroma-ebooks/./fetch_posts.py", line 137, in _fetch_account
await tx.send(activity)
File "/home/joel/.local/lib/python3.9/site-packages/anyio/streams/memory.py", line 193, in send
self.send_nowait(item)
File "/home/joel/.local/lib/python3.9/site-packages/anyio/streams/memory.py", line 175, in send_nowait
raise ClosedResourceError
anyio.ClosedResourceError
----------------------------