problem with make_2d_plots.py and qiime 1.9.1

307 views
Skip to first unread message

nathaniel hubert

unread,
Apr 15, 2018, 12:32:07 AM4/15/18
to qiime...@googlegroups.com
Can anybody please help me to figure out why I am getting the error copied below when trying to use make_2d_plots.py and qiime 1.9.1? I understand that QIIME2 does not handle 2D ordinations so hopefully somebody can help me even though QIIME 1 is no longer supported. Any suggestions would be greatly appreciated! 

I have confirmed that I have used this same command before on a different computer with success and using identical commands and identical files on this computer is resulting in this same error, so it has somehting to do with my setup. 

I have tried updating matplotlib to no avail (just because I see matplotlib showing up in many lines of the error output). And I have tried to uninstall and reinstall qiime and python. I cannot find any occurrence of a similar problem and solution. 



Here is the command I ran (copied from an effort that previously successfully generated 2D PCoA ordinations):

$ make_2D_plots.py -i beta_div_REL_n500_LFvHF_Duodenum/bray_curtis_pc.txt -o REL_n500_LFvHF_Duodenum_bray_curtis_2D_PCoA____TEST____/  -m map_QIIME.txt


Here is the error message:

Traceback (most recent call last):
  File "/Users/nate/miniconda2/bin/make_2D_plots.py", line 242, in <module>
    main()
  File "/Users/nate/miniconda2/bin/make_2D_plots.py", line 238, in main
    label_color, opts.scree, opts.pct_variation_below_one)
  File "/Users/nate/miniconda2/lib/python2.7/site-packages/qiime/make_2d_plots.py", line 608, in generate_2d_plots
    pct_variation_below_one=pct_variation_below_one)
  File "/Users/nate/miniconda2/lib/python2.7/site-packages/qiime/make_2d_plots.py", line 461, in draw_pcoa_graph
    generate_eps=generate_eps)
  File "/Users/nate/miniconda2/lib/python2.7/site-packages/qiime/make_2d_plots.py", line 248, in make_interactive_scatter
    alpha)
  File "/Users/nate/miniconda2/lib/python2.7/site-packages/qiime/make_2d_plots.py", line 330, in draw_scatterplot
    ax = fig.add_subplot(111, axisbg=background_color)
  File "/Users/nate/miniconda2/lib/python2.7/site-packages/matplotlib/figure.py", line 1239, in add_subplot
    a = subplot_class_factory(projection_class)(self, *args, **kwargs)
  File "/Users/nate/miniconda2/lib/python2.7/site-packages/matplotlib/axes/_subplots.py", line 77, in __init__
    self._axes_class.__init__(self, fig, self.figbox, **kwargs)
  File "/Users/nate/miniconda2/lib/python2.7/site-packages/matplotlib/axes/_base.py", line 539, in __init__
    self.update(kwargs)
  File "/Users/nate/miniconda2/lib/python2.7/site-packages/matplotlib/artist.py", line 888, in update
    for k, v in props.items()]
  File "/Users/nate/miniconda2/lib/python2.7/site-packages/matplotlib/artist.py", line 881, in _update_property
    raise AttributeError('Unknown property %s' % k)
AttributeError: Unknown property axisbg


Thanks again!
Nate

TonyWalters

unread,
Apr 15, 2018, 2:30:35 AM4/15/18
to Qiime 1 Forum
Hello Nate,

It may be that you have a newer version of matplotlib that isn't backwards compatible with the calls to it and it's causing the error.

You should have version 1.4.3 matplotlib if you do print_qiime_config.py (this may also be an issue with the version of python or numpy though).

nathaniel hubert

unread,
Apr 17, 2018, 4:31:21 PM4/17/18
to Qiime 1 Forum
Hi Tony Walters, 

Thank you for your help! I indeedd had matplotlib version v2.2.2. 
I was able to resolve by following the instructions for installation via conda virtual environment on the QIIME website. 

I am not sure why I had a matplotlib version installed in miniconda2 that was incompatible with QIIME.
When I realized there was a problem that may have to do with matplotlib, I updated it per a solution that was found for a similar problem. 
I was not able to fix the native version that was running via miniconda2 python2.7. 
I tried uninstalling 2.2.2. and installing 1.4.3 in its place but still find 2.2.2 when I print the QIIME configuration.

Thank you very much for providing me with a solution, this had me stuck for a long time!
Nate
Reply all
Reply to author
Forward
0 new messages