harbor run -t openthoughts/tasktrove-swe-rebench-patched-oracle-swe_rebench-00923
harbor download openthoughts/tasktrove-swe-rebench-patched-oracle-swe_rebench-00923
cd /testbed git clone https://github.com/aau-network-security/richkit.git . && git checkout 9848e909713e69cf37df774be1002b73fa880a1f pip install -r /setup_files/requirements.txt pip install -e . pip install pytest coverage
Fix example from README.md: retrieve.symantec.LocalCategoryDB
$ ipython Python 3.7.0 (default, Feb 4 2020, 14:16:38) Type 'copyright', 'credits' or 'license' for more information IPython 7.12.0 -- An enhanced Interactive Python. Type '?' for help. In [1]: >>> from richkit.retrieve.symantec import fetch_from_internet ...: >>> from richkit.retrieve.symantec import LocalCategoryDB ...: >>> ...: >>> urls = ["www.aau.dk","www.github.com","www.google.com"] ...: >>> ...: >>> local_db = LocalCategoryDB() ...: >>> for url in urls: ...: ... url_category=local_db.get_category(url) ...: ... if url_category=='': ...: ... url_category=fetch_from_internet(url) ...: ... print(url_category) ...: --------------------------------------------------------------------------- FileNotFoundError Traceback (most recent call last) <ipython-input-1-4c50769c2b82> in <module> 4 urls = ["www.aau.dk","www.github.com","www.google.com"] 5 ----> 6 local_db = LocalCategoryDB() 7 for url in urls: 8 url_category=local_db.get_category(url) ~/git-reps/richkit/richkit/retrieve/symantec.py in __init__(self) 49 def __init__(self): 50 ---> 51 self.url_to_category = read_categorized_file() 52 53 def get_category(self, url): ~/git-reps/richkit/richkit/retrieve/symantec.py in read_categorized_file() 149 url_to_category = dict() 150 if not os.path.exists(categorized_urls_file): --> 151 open(categorized_urls_file,'w').close() 152 else: 153 with open(categorized_urls_file, "r") as ins: FileNotFoundError: [Errno 2] No such file or directory: 'dat/retrieve/data/categorized_urls.txt'