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

Fix a small bug on windows system #72

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

Conversation

hua-ops
Copy link

@hua-ops hua-ops commented Sep 6, 2023

When I tried to run prepare_data.py on Windows System, I was having the error: assert len(ascii_sequences) == len(line_stroke_fnames) AssertionError. This is because on Windows system, os.path.join() gets the path concatenation character '\', so the path from line 50 of prepare_data.py would look like this: data/raw/ascii/z01\z01-000\z01-000z.txt, causing line 59 to be inaccessible and skipping the loop.
By changing fnames.append(os.path.join(dirpath, filename)) with fnames.append(os.path.join(dirpath, filename).replace('\\', '/')) in line 50, the error removed, and successfully processed the data.

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