lacus
lacus copied to clipboard
[Bug]: `UnboundLocalError: local variable 'to_capture' referenced before assignment`
I am using Ubuntu 22.04 and your repo with Python=3.10 and Poetry 2.10.
I have been getting the following error with LacusCore after executing poetry run scrape. This happens a few times, recovers, but ultimately fails.
I am running TOR over VPN and wondering if that could be the cause....
2025-05-19:10:06:57,97 INFO [ec243fed-a581-4dfa-bd45-74b38fe1a541] Unable to process http://wi5q5npnch6fy5y7m4jtjznrydzyhtp6ik4j5swrdsehdwtvv3akleqd.onion/: net::ERR_SOCKS_CONNECTION_FAILED
2025-05-19:10:06:57,186 INFO [ec243fed-a581-4dfa-bd45-74b38fe1a541] Capture of http://wi5q5npnch6fy5y7m4jtjznrydzyhtp6ik4j5swrdsehdwtvv3akleqd.onion/ finished - Runtime: 9.986148357391357s
2025-05-19:10:07:19,501 INFO [ec0a1099-8f8d-4ef5-aa5a-0cf68477562c] Capture of http://weyhro27ruifvuqkk3hxzcrtxv2lsalntxgkv6q2j3znkhdqudz54rqd.onion/leaks finished - Runtime: 32.30055594444275s
2025-05-19:10:07:24,941 INFO [eb448f73-fbbf-4c27-b5f6-c6d87e238c23] Capture of http://z6wkgghtoawog5noty5nxulmmt2zs7c3yvwr22v4czbffdoly2kl4uad.onion finished - Runtime: 37.74073004722595s
2025-05-19:10:07:25,348 WARNING [eb18babf-e0f4-428e-9907-40d7e86ba204] Unable to capture: No capture settings for eb18babf-e0f4-428e-9907-40d7e86ba204
2025-05-19:10:07:25,349 WARNING [eb12a593-2bd4-4b96-9f83-8b3229d17886] Unable to capture: No capture settings for eb12a593-2bd4-4b96-9f83-8b3229d17886
2025-05-19:10:07:25,349 ERROR [eb18babf-e0f4-428e-9907-40d7e86ba204] Capture raised an uncaught exception
Traceback (most recent call last):
File "/home/ubuntu/.cache/pypoetry/virtualenvs/ransomlook-ReUawxAY-py3.10/lib/python3.10/site-packages/lacuscore/task_logger.py", line 51, in _handle_task_result
task.result()
File "/home/ubuntu/.cache/pypoetry/virtualenvs/ransomlook-ReUawxAY-py3.10/lib/python3.10/site-packages/lacuscore/lacuscore.py", line 627, in _capture
if to_capture.document:
UnboundLocalError: local variable 'to_capture' referenced before assignment
2025-05-19:10:07:25,350 ERROR [eb12a593-2bd4-4b96-9f83-8b3229d17886] Capture raised an uncaught exception
Traceback (most recent call last):
File "/home/ubuntu/.cache/pypoetry/virtualenvs/ransomlook-ReUawxAY-py3.10/lib/python3.10/site-packages/lacuscore/task_logger.py", line 51, in _handle_task_result
task.result()
File "/home/ubuntu/.cache/pypoetry/virtualenvs/ransomlook-ReUawxAY-py3.10/lib/python3.10/site-packages/lacuscore/lacuscore.py", line 627, in _capture
if to_capture.document:
UnboundLocalError: local variable 'to_capture' referenced before assignment
2025-05-19:10:07:25,350 WARNING [eb160c40-0520-43ed-bdcd-bb545066461b] The capture of http://md7a4mzsppjuaw4zczoojpo7arqrlnmhlqoo35ttrc7l2lpeiblx2yqd.onion/ has been cancelled.
2025-05-19:10:07:25,351 WARNING [eb37e8ad-cfff-45c3-b2c9-eebca903ee02] The capture of http://m7vtnbsgctdcsccqmpnmi6igg3pcuiliqqqsq6uonkzg4blpa4eysiad.onion/ has been cancelled.
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/home/ubuntu/RansomLook/bin/scrape.py", line 7, in main
ransomlook.scraper(0)
File "/home/ubuntu/RansomLook/ransomlook/ransomlook.py", line 200, in scraper
asyncio.run(run_captures())
File "/usr/lib/python3.10/asyncio/runners.py", line 44, in run
return loop.run_until_complete(main)
File "/usr/lib/python3.10/asyncio/base_events.py", line 649, in run_until_complete
return future.result()
File "/home/ubuntu/RansomLook/ransomlook/ransomlook.py", line 74, in run_captures
await asyncio.gather(*captures) # wait for all tasks to complete
File "/home/ubuntu/.cache/pypoetry/virtualenvs/ransomlook-ReUawxAY-py3.10/lib/python3.10/site-packages/lacuscore/task_logger.py", line 51, in _handle_task_result
task.result()
File "/home/ubuntu/.cache/pypoetry/virtualenvs/ransomlook-ReUawxAY-py3.10/lib/python3.10/site-packages/lacuscore/lacuscore.py", line 627, in _capture
if to_capture.document:
UnboundLocalError: local variable 'to_capture' referenced before assignment