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

Casing in parameters is mangled resulting in KeyError #181

Open
ebolyen opened this issue Mar 16, 2018 · 0 comments
Open

Casing in parameters is mangled resulting in KeyError #181

ebolyen opened this issue Mar 16, 2018 · 0 comments
Labels
type:bug Something is wrong.

Comments

@ebolyen
Copy link
Member

ebolyen commented Mar 16, 2018

Bug Description
Example of a traceback:

§ qiime perc-norm percentile-normalize
QIIME is caching your current deployment for improved performance. This may take a few moments and should only happen once per deployment.
{'output_dir': None, 'verbose': None, 'm_metadata_file': (), 'cmd_config': None, 'p_n_control_thresh': None, 'i_table': None, 'o_perc_norm_table': None, 'quiet': None, 'p_otu_thresh': None, 'm_metadata_column': None}
Traceback (most recent call last):
  File "/home/evan/.conda/envs/q2-dev/bin/qiime", line 11, in <module>
    load_entry_point('q2cli', 'console_scripts', 'qiime')()
  File "/home/evan/.conda/envs/q2-dev/lib/python3.5/site-packages/click/core.py", line 722, in __call__
    return self.main(*args, **kwargs)
  File "/home/evan/.conda/envs/q2-dev/lib/python3.5/site-packages/click/core.py", line 697, in main
    rv = self.invoke(ctx)
  File "/home/evan/.conda/envs/q2-dev/lib/python3.5/site-packages/click/core.py", line 1066, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/evan/.conda/envs/q2-dev/lib/python3.5/site-packages/click/core.py", line 1066, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/evan/.conda/envs/q2-dev/lib/python3.5/site-packages/click/core.py", line 895, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/evan/.conda/envs/q2-dev/lib/python3.5/site-packages/click/core.py", line 535, in invoke
    return callback(*args, **kwargs)
  File "/home/evan/workspace/qiime2/q2cli/q2cli/commands.py", line 213, in __call__
    arguments, missing_in, verbose, quiet = self.handle_in_params(kwargs)
  File "/home/evan/workspace/qiime2/q2cli/q2cli/commands.py", line 289, in handle_in_params
    kwargs, fallback=cmd_fallback
  File "/home/evan/workspace/qiime2/q2cli/q2cli/handlers.py", line 637, in get_value
    value = self._locate_value(arguments, fallback)
  File "/home/evan/workspace/qiime2/q2cli/q2cli/handlers.py", line 55, in _locate_value
    v = arguments[self.click_name]
KeyError: 'p_N_control_thresh'

It looks like click arguments are being received as lowercase.

References
forum x-ref

@ebolyen ebolyen added the type:bug Something is wrong. label Mar 16, 2018
ChrisKeefe pushed a commit to ChrisKeefe/q2cli that referenced this issue Jan 10, 2019
Fixes qiime2#223.
Fixes qiime2#181.

The following clean up correctly:

- Writing a script using the Artifact API where the artifacts go out of scope at the end of the script (qiime2#223)
- Running the tests without `QIIMETEST` set
- Running a script where the action fails from input
- Modifying the `callable_wrapper` to except in the middle and running the tests

These used to leave behind junk and no longer do.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:bug Something is wrong.
Projects
None yet
Development

No branches or pull requests

1 participant