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

Error message for incorrect argument ordering #22

Closed
roedoejet opened this issue Feb 11, 2020 · 1 comment
Closed

Error message for incorrect argument ordering #22

roedoejet opened this issue Feb 11, 2020 · 1 comment
Labels
bug Something isn't working

Comments

@roedoejet
Copy link
Collaborator

If you accidentally provide an audio file as the first argument to readalongs align and a text file after, it tries to read the mp3 file as a text file and gives the following error:

UnicodeDecodeError: 'utf-8' codec can't decode byte 0xff in position 45: invalid start byte

We should handle this differently.

@roedoejet roedoejet added the bug Something isn't working label Feb 11, 2020
@joanise
Copy link
Member

joanise commented Nov 25, 2021

This error still occurs. E.g.:

$ readalongs align -l fra data/ej-fra.m4a data/ej-fra.txt delme -f
Traceback (most recent call last):
  File "C:\Users\joanise\RAS\ras-env\Scripts\readalongs-script.py", line 11, in <module>
    load_entry_point('readalongs', 'console_scripts', 'readalongs')()
  File "c:\users\joanise\ras\ras-env\lib\site-packages\click\core.py", line 1137, in __call__
    return self.main(*args, **kwargs)
  File "c:\users\joanise\ras\ras-env\lib\site-packages\click\core.py", line 1062, in main
    rv = self.invoke(ctx)
  File "c:\users\joanise\ras\ras-env\lib\site-packages\click\core.py", line 1668, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "c:\users\joanise\ras\ras-env\lib\site-packages\click\core.py", line 1404, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "c:\users\joanise\ras\ras-env\lib\site-packages\click\core.py", line 763, in invoke
    return __callback(*args, **kwargs)
  File "c:\users\joanise\ras\studio\readalongs\cli.py", line 343, in align
    save_temps=temp_base,
  File "c:\users\joanise\ras\studio\readalongs\align.py", line 808, in create_input_tei
    text = f.readlines()
  File "C:\Users\joanise\AppData\Local\Programs\Python\Python37\lib\codecs.py", line 322, in decode
    (result, consumed) = self._buffer_decode(data, self.errors, final)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x80 in position 35: invalid start byte

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants