# AttributeError: 'ICA' object has no attribute	'plot\_properties'

**URL:** <https://mne.discourse.group/t/attributeerror-ica-object-has-no-attribute-plot-properties/1265>\
**Category:** Mailing List Archive (read-only)\
**Tags:** list-archive\
**Created:** [July 24, 2017, 6:31pm UTC](https://mne.discourse.group/t/attributeerror-ica-object-has-no-attribute-plot-properties/1265 "2017-07-24T18:31:11Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/free1/uploads/mne/original/1X/85cc6bd2b69cb698a166dc6d880fb550510d0144.jpeg) [@system](https://mne.discourse.group/u/system)\
**Post date:** [July 24, 2017, 6:31pm UTC](https://mne.discourse.group/t/attributeerror-ica-object-has-no-attribute-plot-properties/1265/1 "2017-07-24T18:31:11Z")

</div>

Dear mne experts,

I have tried to run the example "Artifact Correction with ICA":  
[https://martinos.org/mne/stable/auto\_tutorials/plot\_artifacts\_correction\_ica.html?highlight=ica](https://martinos.org/mne/stable/auto_tutorials/plot_artifacts_correction_ica.html?highlight=ica)

I have also used the same data as is used in the example.

However, I am getting the following error:

AttributeError Traceback (most recent call last)  
/scratch/nbe/braindata/mhhakone/intell/TaskIII/coherence-analysis/test-ica.py  
in \<module\>()  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;56 plt.close()  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;57  
---\> 58 ica.plot\_properties(eog\_epochs, picks=eog\_inds, psd\_args={'fmax':  
35.},  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;59 image\_args={'sigma': 1.})  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;60

AttributeError: 'ICA' object has no attribute 'plot\_properties'

ica is as follows:

\<ICA | raw data decomposition, fit (fastica): 13635 samples, 25  
components, channels used: "mag"; "grad"\>

Could someone please let me know what might be wrong?

Best regards,  
Maria  
-------------- next part --------------  
An HTML attachment was scrubbed...  
URL: [http://mail.nmr.mgh.harvard.edu/pipermail/mne\_analysis/attachments/20170724/0c85c086/attachment.html](http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20170724/0c85c086/attachment.html)

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/free1/uploads/mne/original/1X/85cc6bd2b69cb698a166dc6d880fb550510d0144.jpeg) [@system](https://mne.discourse.group/u/system)\
**Post date:** [July 24, 2017, 8:01pm UTC](https://mne.discourse.group/t/attributeerror-ica-object-has-no-attribute-plot-properties/1265/2 "2017-07-24T20:01:52Z")

</div>

Your mne version might be too old - can you check:  
import mne  
print(mne.\_\_version\_\_)

24.07.2017 20:31 "Maria Hakonen" \<maria.hakonen at [gmail.com](http://gmail.com)\> napisa?(a):

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/free1/uploads/mne/original/1X/85cc6bd2b69cb698a166dc6d880fb550510d0144.jpeg) [@system](https://mne.discourse.group/u/system)\
**Post date:** [July 25, 2017, 6:59am UTC](https://mne.discourse.group/t/attributeerror-ica-object-has-no-attribute-plot-properties/1265/3 "2017-07-25T06:59:13Z")

</div>

print(mne.\_\_version\_\_) gives 0.11.dev0.

Python and conda versions are:  
Python 2.7.13 :: Anaconda 4.3.0 (64-bit)  
conda 4.3.21

I tried:  
pip install --user mne --upgrade

Which gives:  
Collecting mne  
Installing collected packages: mne  
Successfully installed mne-0.14.1

However, print(mne.\_\_version\_\_) still gives 0.11.dev0, and I am also getting the same error.

Best,  
Maria

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/free1/uploads/mne/original/1X/85cc6bd2b69cb698a166dc6d880fb550510d0144.jpeg) [@system](https://mne.discourse.group/u/system)\
**Post date:** [July 25, 2017, 8:26am UTC](https://mne.discourse.group/t/attributeerror-ica-object-has-no-attribute-plot-properties/1265/4 "2017-07-25T08:26:14Z")

</div>

It seems like you have two versions of mne installed on your system. One via pip and another one with some other method, with the latter being found before the latest one. If you check:

import mne  
print(mne.\_\_path\_\_)

you can see where you import your mne from. Assuming that you don't need that older version, you could simply remove it from your system, and the next time you import mne, python should only find the newest version.

Eduard

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/free1/uploads/mne/original/1X/85cc6bd2b69cb698a166dc6d880fb550510d0144.jpeg) [@system](https://mne.discourse.group/u/system)\
**Post date:** [July 25, 2017, 9:26am UTC](https://mne.discourse.group/t/attributeerror-ica-object-has-no-attribute-plot-properties/1265/5 "2017-07-25T09:26:46Z")

</div>

Another possibility is that you did not restart python/notebook after  
updating mne.

25.07.2017 10:26 "Ort, E." \<e.ort at vu.nl\> napisa?(a):

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/free1/uploads/mne/original/1X/85cc6bd2b69cb698a166dc6d880fb550510d0144.jpeg) [@system](https://mne.discourse.group/u/system)\
**Post date:** [August 1, 2017, 2:47pm UTC](https://mne.discourse.group/t/attributeerror-ica-object-has-no-attribute-plot-properties/1265/6 "2017-08-01T14:47:06Z")

</div>

Thank you for the answers!

The example script seems to work correctly with mne 0.14.1 and  
matplotlib 1.5.1. If I use matplotlib 2.0.0, the black outlines of the  
columns are missing in the figure "ICA component scores" (i.e. there is  
only a red column).

Best,  
Maria

2017-07-25 12:26 GMT+03:00 Miko?aj Magnuski \<mmagnuski at swps.edu.pl\>:

> Another possibility is that you did not restart python/notebook after  
> updating mne.
> 
> 25.07.2017 10:26 "Ort, E." \<e.ort at vu.nl\> napisa?(a):
> 
> > It seems like you have two versions of mne installed on your system. One  
> > via pip and another one with some other method, with the latter being found  
> > before the latest one. If you check:
> > 
> > import mne  
> > print(mne.\_\_path\_\_)
> > 
> > you can see where you import your mne from. Assuming that you don't need  
> > that older version, you could simply remove it from your system, and the  
> > next time you import mne, python should only find the newest version.
> > 
> > Eduard  
> > \_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_  
> > From: mne\_analysis-bounces at nmr.mgh.harvard.edu [  
> > mne\_analysis-bounces at nmr.mgh.harvard.edu] on behalf of Hakonen Maria [  
> > maria.hakonen at aalto.fi]  
> > Sent: 25 July 2017 08:59  
> > To: Discussion and support forum for the users of MNE Software  
> > Subject: Re: [Mne\_analysis] AttributeError: 'ICA' object has no  
> > attribute 'plot\_properties'
> > 
> > print(mne.\_\_version\_\_) gives 0.11.dev0.
> > 
> > Python and conda versions are:  
> > Python 2.7.13 :: Anaconda 4.3.0 (64-bit)  
> > conda 4.3.21
> > 
> > I tried:  
> > pip install --user mne --upgrade
> > 
> > Which gives:  
> > Collecting mne  
> > Installing collected packages: mne  
> > Successfully installed mne-0.14.1
> > 
> > However, print(mne.\_\_version\_\_) still gives 0.11.dev0, and I am also  
> > getting the same error.
> > 
> > Best,  
> > Maria
> > 
> > \_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_  
> > L?hett?j?: mne\_analysis-bounces at nmr.mgh.harvard.edu \<  
> > mne\_analysis-bounces at nmr.mgh.harvard.edu\> k?ytt?j?n Miko?aj Magnuski \<  
> > mmagnuski at swps.edu.pl\> puolesta  
> > L?hetetty: 24. hein?kuuta 2017 23:01:52  
> > Vastaanottaja: Discussion and support forum for the users of MNE Software  
> > Aihe: Re: [Mne\_analysis] AttributeError: 'ICA' object has no attribute  
> > 'plot\_properties'
> > 
> > Your mne version might be too old - can you check:  
> > import mne  
> > print(mne.\_\_version\_\_)
> > 
> > 24.07.2017 20:31 "Maria Hakonen" \<maria.hakonen at gmail.com\<mailto:  
> > maria.hakonen at gmail.com\>\> napisa?(a):  
> > Dear mne experts,
> > 
> > I have tried to run the example "Artifact Correction with ICA":  
> > [https://martinos.org/mne/stable/auto\_tutorials/plot\_artifact](https://martinos.org/mne/stable/auto_tutorials/plot_artifact)  
> > s\_correction\_ica.html?highlight=ica
> > 
> > I have also used the same data as is used in the example.
> > 
> > However, I am getting the following error:
> > 
> > AttributeError Traceback (most recent call  
> > last)  
> > /scratch/nbe/braindata/mhhakone/intell/TaskIII/coherence-analysis/test-ica.py  
> > in \<module\>()  
> > &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;56 plt.close()  
> > &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;57  
> > ---\> 58 ica.plot\_properties(eog\_epochs, picks=eog\_inds,  
> > psd\_args={'fmax': 35.},  
> > &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;59 image\_args={'sigma': 1.})  
> > &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;60
> > 
> > AttributeError: 'ICA' object has no attribute 'plot\_properties'
> > 
> > ica is as follows:
> > 
> > \<ICA | raw data decomposition, fit (fastica): 13635 samples, 25  
> > components, channels used: "mag"; "grad"\>
> > 
> > Could someone please let me know what might be wrong?
> > 
> > Best regards,  
> > Maria
> > 
> > \_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_  
> > Mne\_analysis mailing list  
> > Mne\_analysis at nmr.mgh.harvard.edu\<mailto:Mne\_analysis at nmr.mgh.harvard.edu\>  
> > [Mne\_analysis Info Page](https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis)
> > 
> > The information in this e-mail is intended only for the person to whom it  
> > is  
> > addressed. If you believe this e-mail was sent to you in error and the  
> > e-mail  
> > contains patient information, please contact the Partners Compliance  
> > HelpLine at  
> > [MyComplianceReport.com: Compliance and Ethics Reporting](http://www.partners.org/complianceline) . If the e-mail was sent to you  
> > in error  
> > but does not contain patient information, please contact the sender and  
> > properly  
> > dispose of the e-mail.
> > 
> > \_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_
> > 
> > \_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_  
> > Mne\_analysis mailing list  
> > Mne\_analysis at nmr.mgh.harvard.edu  
> > [Mne\_analysis Info Page](https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis)
> > 
> > \_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_  
> > Mne\_analysis mailing list  
> > Mne\_analysis at nmr.mgh.harvard.edu  
> > [Mne\_analysis Info Page](https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis)
> 
> ------------------------------
> 
> \_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_  
> Mne\_analysis mailing list  
> Mne\_analysis at nmr.mgh.harvard.edu  
> [Mne\_analysis Info Page](https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis)
> 
> The information in this e-mail is intended only for the person to whom it  
> is  
> addressed. If you believe this e-mail was sent to you in error and the  
> e-mail  
> contains patient information, please contact the Partners Compliance  
> HelpLine at  
> [MyComplianceReport.com: Compliance and Ethics Reporting](http://www.partners.org/complianceline) . If the e-mail was sent to you in  
> error  
> but does not contain patient information, please contact the sender and  
> properly  
> dispose of the e-mail.

-------------- next part --------------  
An HTML attachment was scrubbed...  
URL: [http://mail.nmr.mgh.harvard.edu/pipermail/mne\_analysis/attachments/20170801/599a3bbc/attachment-0001.html](http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20170801/599a3bbc/attachment-0001.html)

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/free1/uploads/mne/original/1X/85cc6bd2b69cb698a166dc6d880fb550510d0144.jpeg) [@system](https://mne.discourse.group/u/system)\
**Post date:** [August 2, 2017, 7:15pm UTC](https://mne.discourse.group/t/attributeerror-ica-object-has-no-attribute-plot-properties/1265/7 "2017-08-02T19:15:05Z")

</div>

Hi Maria,

thanks a lot for the bug report. It should be fixed in  
[https://github.com/mne-tools/mne-python/pull/4449](https://github.com/mne-tools/mne-python/pull/4449)

Best,  
Alex
