ERROR: target_path not defined
#1
by
Light00
- opened
As the title says, target_path does not get defined
there may be a issue in this part of the code:
Walk through the directory tree recursively
for root, dirs, files in os.walk(cache_dir):
# Check if the target directory is in the list of directories
if target_dir in dirs:
# Get the full path of the target directory
target_path = os.path.join(root, target_dir)
You're right there is a mistake! Thanks for reporting the issue @Light00
The problem was giving the whole path to target_dir
It should be:
target_dir = BOOK
# Walk through the directory tree recursively
for root, dirs, files in os.walk(cache_dir):
# Check if the target directory is in the list of directories
if target_dir in dirs:
# Get the full path of the target directory
target_path = os.path.join(root, target_dir)
README
has been updated with this
calmgoose
changed discussion status to
closed