Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

change path_to_file_list, train_file_list_to_json #240

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Neogulmanpassingby
Copy link

In the path_to_file_list function, the file is opened in 'w' mode (write mode), which is used for writing new content, not for reading. You need to open the file in read mode.
Correction: Change 'w' to 'r'.
In the path_to_file_list function, the code attempts to return a variable lines which has not been defined or assigned.
Correction: Add code to read the contents of the file and return it as a list.
Function Usage and Logic Error:
The train_file_list_to_json function has incorrectly implemented file processing. Additionally, the JSON string template is improperly structured.
Correction: Correctly structure the JSON template and accurately implement the string processing logic.
Incorrect File Writing Mode:
In the write_file_list function, the file is opened in 'r' mode (read mode), which is not suitable for writing. You need to use 'w' mode (write mode) or 'a' mode (append mode) for writing.
Correction: Change 'r' to 'w'.
Incorrect Function Call:
In the main block, the use of train_file_list_to_json and path_to_file_list functions is incorrect.
Correction: Correct the function calls to ensure they are properly used.

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.

1 participant