Skip to content

AttributeError: 'Emperor' object has no attribute 'render_base_dependencies' #802

Description

@fedarko

While I was running Empress to generate an Empire plot (just using the normal moving pictures data), I kept getting this error:

Traceback (most recent call last):
  File "/home/marcus/Software/miniconda2/envs/qiime2-2021.2/lib/python3.6/site-packages/q2cli/commands.py", line 329, in __call__
    results = action(**arguments)
  File "</home/marcus/.local/lib/python3.6/site-packages/decorator.py:decorator-gen-547>", line 2, in community_plot
  File "/home/marcus/Software/miniconda2/envs/qiime2-2021.2/lib/python3.6/site-packages/qiime2/sdk/action.py", line 245, in bound_callable
    output_types, provenance)
  File "/home/marcus/Software/miniconda2/envs/qiime2-2021.2/lib/python3.6/site-packages/qiime2/sdk/action.py", line 452, in _callable_executor_
    ret_val = self._callable(output_dir=temp_dir, **view_args)
  File "/home/marcus/Dropbox/Work/KnightLab/Empress/fedarko/empress/empress/_plot.py", line 53, in community_plot
    save_viz(viz, output_dir)
  File "/home/marcus/Dropbox/Work/KnightLab/Empress/fedarko/empress/empress/_plot_utils.py", line 52, in save_viz
    htmlfile.write(str(viz))
  File "/home/marcus/Dropbox/Work/KnightLab/Empress/fedarko/empress/empress/core.py", line 269, in __str__
    return self.make_empress()
  File "/home/marcus/Dropbox/Work/KnightLab/Empress/fedarko/empress/empress/core.py", line 294, in make_empress
    data = self.to_dict()
  File "/home/marcus/Dropbox/Work/KnightLab/Empress/fedarko/empress/empress/core.py", line 391, in to_dict
    data_to_render.update(self._scavenge_emperor())
  File "/home/marcus/Dropbox/Work/KnightLab/Empress/fedarko/empress/empress/core.py", line 424, in _scavenge_emperor
    emperor_base_dependencies = self._emperor.render_base_dependencies()
AttributeError: 'Emperor' object has no attribute 'render_base_dependencies'

This was within a QIIME 2 2021.2 conda environment, with emperor 1.0.2 installed. I was pretty confused, since v1.0.2 should have render_base_dependencies installed. (For reference, this error was also documented on the Q2 forums a few months back here.) However, I was running this within a conda environment I'd been using for quite some time; I'm pretty sure this Q2 environment worked fine with Empress/Emperor for a while. Maybe something I installed messed things up...?

Installing emperor 1.0.3 fixed the problem, strangely (now I can generate Empire plots without a problem). Even more strangely, installing emperor 1.0.2 again (replacing v1.0.3 with v1.0.2) still fixed the problem?

I'm not sure of the cause of this error, but I wanted to document it. There might be some sort of weird inconsistency issue that pops up in QIIME 2 environments when certain things go wrong; it seems like reinstalling Emperor >= 1.0.2 consistently fixes the problem. If other folks start running into this error, we could investigate further.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions