Parser in e2e_asr_transducer is missing a return statment
See original GitHub issueIn the code: https://github.com/espnet/espnet/blob/master/espnet/nets/pytorch_backend/e2e_asr_transducer.py
You’re not returning parser in add_arguments
. This throws an error when attempting to call E2E.build()
Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (1 by maintainers)
Top Results From Across the Web
JavaCC - Missing Return Statement Exception - Stack Overflow
In the generated parser file, this method throws a missing return statement exception, although I find the return statement is always ...
Read more >Java Missing Return Statement - Baeldung
The missing return statement error is a compile-time error. The main causes are: a return statement was simply omitted by mistake. the method ......
Read more >Missing Return Statement Required return type string
I am a beginner, I wrote this code to basically take two JSON POSTS and combine them I am getting a Save Error:...
Read more >[Solved] Missing return statement in java error
1. Method missing the return statement. public class HelloWorld { public static ...
Read more >Java missing return statement - Javatpoint
The missing return statement is one of the most occurred errors in the Java program. The beginners usually face the missing return statement...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thank you for the PR that fixes the issue. I read your explanation and came to understanding of your point. What you’re doing is passing a
parser
object by reference to theadd_argument
function, which is working well for you. However, in your code/path/to/utils/fill_missing_args.py
you’re assuming thatparser
is returned, since you’re callingparse_known_args()
on the execution of the function, therefore failing in this case. Another solution can be introduced which is to change the linedefault_args, _ = add_arguments(argparse.ArgumentParser()).parse_known_args()
into separate lines as so:Regards,
Thanks for taking the time to review my issue. The issue arises when trying to import E2E asr_transducer, then using the command E2E.build(). The error occurs when the line
default_args, _ = add_arguments(argparse.ArgumentParser()).parse_known_args()
is executed in the file(...)/espnet/utils/fill_missing_args.py
. Using the available train and eval files will not yield that error, but creating a new python file with the correct imports will create the error:NoneType Object does not have attribute parse_known_args()