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
When arguments contain spaces, argparse is unable to parse the spaces and causes our code to crash. I encountered this error when attempting to run through the analysis test run. When running through the first section of the tutorial, the user is asked to specify the probe sets used before running the wrangler app. In the example, we write
probe_sets_used="DR1,VAR4"
However, if the user adds a space in between these two probe sets:
probe_sets_used="DR1, VAR4"
and tries to run the wrangler app using the following:
Seeing as we are unable to deal with spaces within the python file, I suggest we deal with any spaces and misformatted arguments within the wrangler app before feeding in our arguments to the python script. We can do simple string manipulation in bash as outlined here. For instance, to remove whitespace:
Bug Description
When arguments contain spaces,
argparse
is unable to parse the spaces and causes our code to crash. I encountered this error when attempting to run through the analysis test run. When running through the first section of the tutorial, the user is asked to specify the probe sets used before running the wrangler app. In the example, we writeprobe_sets_used="DR1,VAR4"
However, if the user adds a space in between these two probe sets:
probe_sets_used="DR1, VAR4"
and tries to run the wrangler app using the following:
the app will fail with the following error:
generate_wrangler_scripts.py: error: unrecognized arguments: VAR4
.Our code does aim to deal with these cases by cleaning up spaces in the following lines:
MIPTools/src/generate_wrangler_scripts.py
Lines 79 to 96 in 09f52ef
However, the code fails before we are able to reach this stage. It seems that the error is triggered by
argparse
here:MIPTools/src/generate_wrangler_scripts.py
Line 68 in 09f52ef
Suggested Implementation
Seeing as we are unable to deal with spaces within the python file, I suggest we deal with any spaces and misformatted arguments within the wrangler app before feeding in our arguments to the python script. We can do simple string manipulation in bash as outlined here. For instance, to remove whitespace:
The text was updated successfully, but these errors were encountered: