Skip to content

Conversation

padam-ghimire
Copy link
Contributor

@padam-ghimire padam-ghimire commented Apr 24, 2024

It appears that OUTPUT_DIR is the base directory, and you're trying to create two files within it. However, when you're specifying the file paths for writing, you're not directly referencing OUTPUT_DIR for the second file.

You're using args.output, which only contains the filename, not the full path. To ensure that both files are created within the OUTPUT_DIR, you should use os.path.join() to construct the full file paths

create_dir(OUTPUT_DIR) # Create the output directory if not exists
with open(os.path.join(OUTPUT_DIR, 'school-center-distance.tsv'), 'w', encoding='utf-8') as intermediate_file, \
open(os.path.join(OUTPUT_DIR, args.output), 'w', encoding='utf-8') as a_file:

This way, both files will be created within the OUTPUT_DIR, resolving the issue with the output directory generation.

@ashiishme
Copy link

There are already 2 more PRs (#45 & #54 ) resolving the same issue. You should collaborate with any of them to come with common solution.

@sumanashrestha
Copy link
Collaborator

thank you for you time on this. #45 has been merged for this issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants