You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello,
we are trying to run force_align after using the fast_align, the fast_align is working fine and we get the model.
After running force_align, we get Traceback (most recent call last):
File "/home/christine/fast_align/build/force_align.py", line 93, in
main()
File "/home/christine/fast_align/build/force_align.py", line 87, in main
sys.stdout.write('{}\n'.format(aligner.align(line.strip())))
File "/home/christine/fast_align/build/force_align.py", line 30, in align
self.fwd_align.stdin.write('{}\n'.format(line))
TypeError: a bytes-like object is required, not 'str'
we are running on python 3.6.9.
we do not know where the problem can be from, we are using the right format of sentence:
The mechanic gave the clerk a present because it was his birthday. ||| La mecánica dio al Cirque durargo, porque era su cumpleaños.
please advise!!
The text was updated successfully, but these errors were encountered:
Hi, if you use python3, you should set bufsize = 1 and universal_newlines= True in subprocess.Popen . @lluisg@ChristineBasta
And you can also set the "encoding" in module subprocess if you meet encode problem
cbaziotis
added a commit
to cbaziotis/fast_align
that referenced
this issue
Jun 8, 2021
Hello,
we are trying to run force_align after using the fast_align, the fast_align is working fine and we get the model.
After running force_align, we get Traceback (most recent call last):
File "/home/christine/fast_align/build/force_align.py", line 93, in
main()
File "/home/christine/fast_align/build/force_align.py", line 87, in main
sys.stdout.write('{}\n'.format(aligner.align(line.strip())))
File "/home/christine/fast_align/build/force_align.py", line 30, in align
self.fwd_align.stdin.write('{}\n'.format(line))
TypeError: a bytes-like object is required, not 'str'
we are running on python 3.6.9.
we do not know where the problem can be from, we are using the right format of sentence:
The mechanic gave the clerk a present because it was his birthday. ||| La mecánica dio al Cirque durargo, porque era su cumpleaños.
please advise!!
The text was updated successfully, but these errors were encountered: