Closed djhmateer closed 9 months ago
can you confirm that everything was working at this commit and that it still does not work after this fix?
for the tmp dir, since we use the with
operator it will always get destroyed once the execution leaves that block, no way I can think of going around it. you could modify the ArchivingContext to use a stationary folder.
Thanks Miguel - yes I can confirm both questions
My Ubuntu 20.04 server is working fine, so I suspect it's something strange on my WSL2 setup with Ubuntu 22.04
I've done a simple code around for now. Will keep an eye on things and maybe the answer will appear!
hard_code_directory_for_wsl2 ='/mnt/c/dev/v6-auto-archiver'
try:
browsertrix_home_host = os.environ.get('BROWSERTRIX_HOME_HOST') or os.path.abspath(ArchivingContext.get_tmp_dir())
except FileNotFoundError:
logger.warning('Dev environment found using ' + hard_code_directory_for_wsl2)
browsertrix_home_host = hard_code_directory_for_wsl2 + ArchivingContext.get_tmp_dir()[1:]
Given it so far seems a WSL specific issue we wont work on this but welcome external contributions, and hope you can find a solution.
Related to https://github.com/bellingcat/auto-archiver/issues/96 which fixed another issue
The error is:
This could be my platform (WSL2) so I'll try on another server.
Have been looking to see how to turn off the deletion of the tmp directory to see if that helps (haven't found out how to do that yet)