Error in citation parsing 'Can't convert 'int' object to str implicitly'

Hello qiime2 team,

I am finishing up my plugin for SCNIC and getting an error after adding citations. I can run qiime SCNIC --citations and qiime SCNIC make-modules-on-correlation-table --citations and not get an error but when I run qiime SCNIC make-modules-on-correlation-table --i-correlation-table fake_correls.qza --i-feature-table fake_data.qza --p-min-r .4 --output-dir testing I get an error with the following output:

Plugin error from SCNIC:

  Can't convert 'int' object to str implicitly

Debug info has been saved to /var/folders/qb/4zs7gtgn29v68_yfnsy78qsh0000gp/T/qiime2-q2cli-err-3a132dws.log

This is the full log:

Traceback (most recent call last):
  File "/Users/shafferm/miniconda2/envs/qiime2-dev-SCNIC/lib/python3.5/site-packages/q2cli/", line 274, in __call__
    results = action(**arguments)
  File "<decorator-gen-918>", line 2, in make_modules_on_correlation_table
  File "/Users/shafferm/miniconda2/envs/qiime2-dev-SCNIC/lib/python3.5/site-packages/qiime2/sdk/", line 225, in bound_callable
    spec.view_type, recorder)
  File "/Users/shafferm/miniconda2/envs/qiime2-dev-SCNIC/lib/python3.5/site-packages/qiime2/sdk/", line 265, in _view
  File "/Users/shafferm/miniconda2/envs/qiime2-dev-SCNIC/lib/python3.5/site-packages/qiime2/core/", line 64, in make_transformation
  File "/Users/shafferm/miniconda2/envs/qiime2-dev-SCNIC/lib/python3.5/site-packages/qiime2/core/archive/", line 220, in recorder
    entry['plugin'] = self.reference_plugin(plugin)
  File "/Users/shafferm/miniconda2/envs/qiime2-dev-SCNIC/lib/python3.5/site-packages/qiime2/core/archive/", line 195, in reference_plugin
    citation_key = self.make_citation_key('plugin', plugin, index=idx)
  File "/Users/shafferm/miniconda2/envs/qiime2-dev-SCNIC/lib/python3.5/site-packages/qiime2/core/archive/", line 180, in make_citation_key
    [domain, package + ':' + version] + id_block + [str(index)]))
TypeError: Can't convert 'int' object to str implicitly

I don’t know if this is something weird about my citations.bib or what. Can you make any sense of this? Also is there a way I could write a test that could catch more internal errors like this outside of doing a subprocess call with my test data?

Hi @michael.shaffer,

Shot in the dark, but is your version attribute in your plugin definition an integer by chance? It looks like this code expects a string (and the registration isn’t checking the type so it lets an int through).

1 Like

That was it. Thanks @ebolyen.