The error message FileNotFoundError: [Errno 2] No such file or directory: 'filename' is being thrown because the tool is trying to open a file named 'filename' instead of the file you specified.
This issue arises from the file_exists function in the utils.py file of the crosslinked package. The function is supposed to check if the file you specified exists, but due to a bug, it's trying to open a file named 'filename' instead of the file you specified.
Here's the problematic code:
def file_exists(filename, contents=False):
if not os.path.isfile(filename):
print(f"[!] Input file not found: {filename}")
exit(1)
return [line.strip() for line in open('filename')] if contents else filename
As you can see, the open function is trying to open 'filename' instead of the file you specified. The correct code should be:
def file_exists(filename, contents=False):
if not os.path.isfile(filename):
print(f"[!] Input file not found: {filename}")
exit(1)
return [line.strip() for line in open(filename)] if contents else filename
Fix: modifying the file_exists function in the utils.py file of the crosslinked package.
The error message
FileNotFoundError: [Errno 2] No such file or directory: 'filename'
is being thrown because the tool is trying to open a file named 'filename' instead of the file you specified.This issue arises from the
file_exists
function in theutils.py
file of thecrosslinked
package. The function is supposed to check if the file you specified exists, but due to a bug, it's trying to open a file named 'filename' instead of the file you specified.Here's the problematic code:
As you can see, the
open
function is trying to open 'filename' instead of the file you specified. The correct code should be:Fix: modifying the
file_exists
function in theutils.py
file of thecrosslinked
package.