tuneconfig() error

237 views
Skip to first unread message

Alberto Martinelli

unread,
Dec 13, 2022, 12:49:37 PM12/13/22
to diffpy-users
Dear all,

I've just installed pdfgetx3 2.2.1 with python 3.8.15. I can properly
obtain the gr, iq, fq, sq files; I can also plot the files with the
"plotdata" command.

The "pdfgetx3 --plot=fq,gr *.dat" command works, but regrettably, when I
use "tuneconfig()" the following error appears:

**********************************************************************************************

In [1]: tuneconfig()
---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
Cell In[1], line 1
----> 1 tuneconfig()

File diffpy/pdfgetx/pdfgetxapplication.py:279, in tuneconfig(self,
plotids, pdfgetter, axeslist)

File diffpy/pdfgetx/tuneconfig.py:518, in createTuneConfig(pdfgetter,
**kwargs)

File diffpy/pdfgetx/tuneconfig.py:123, in __init__(self, pdfgetter,
plotids, axeslist, _reset_init_)

File diffpy/pdfgetx/tuneconfig.py:211, in _makeGUIFigure(self)

AttributeError: 'FigureCanvasQTAgg' object has no attribute
'set_window_title'

**********************************************************************************************

How can I resolve it? Thanks in advance!

Alberto

Simon Billinge

unread,
Dec 20, 2022, 8:06:47 AM12/20/22
to diffpy...@googlegroups.com
Dear Alberto, did this get resolved?  If not, please let me know the platform (windows/mac) and we will try and resolve it.

Thanks so much,

S

--
You received this message because you are subscribed to the Google Groups "diffpy-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to diffpy-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/diffpy-users/a8e7b9c7-7f65-543a-e145-947c1002e068%40spin.cnr.it.


--
Simon Billinge
Professor, Columbia University
Physicist, Brookhaven National Laboratory

alberto.m...@spin.cnr.it

unread,
Dec 20, 2022, 8:45:39 AM12/20/22
to diffpy...@googlegroups.com

Songsheng Tao

unread,
Dec 20, 2022, 9:37:23 AM12/20/22
to diffpy...@googlegroups.com
It may be a matplotlib problem. Here is an issue with the same error (https://github.com/matplotlib/matplotlib/issues/17716/). Try updating the matplotlib, and run it again.

To update the matplotlib, please run the following commands in terminal.

conda activate <your environment>
conda update -c conda-forge matplotlib -y

alberto.m...@spin.cnr.it

unread,
Dec 20, 2022, 10:11:06 AM12/20/22
to diffpy...@googlegroups.com, Songsheng Tao
Dear Songsheng Tao,

I updated the matplotlib, but unfortunately the same message error
appears.

the "pdfgetx3 --plot=fq,gr *.xy" command works and both *.fq and *.gr
graphs are plotted.

When I give the command "tuneconfig()" a windows opens, but it remains
white and the program gives the same error as before:

************************************************************************************
AttributeError Traceback (most recent call
last)
Cell In[4], line 1
----> 1 tuneconfig()

File diffpy/pdfgetx/pdfgetxapplication.py:279, in tuneconfig(self,
plotids, pdfgetter, axeslist)

File diffpy/pdfgetx/tuneconfig.py:518, in createTuneConfig(pdfgetter,
**kwargs)

File diffpy/pdfgetx/tuneconfig.py:123, in __init__(self, pdfgetter,
plotids, axeslist, _reset_init_)

File diffpy/pdfgetx/tuneconfig.py:211, in _makeGUIFigure(self)

AttributeError: 'FigureCanvasQTAgg' object has no attribute
'set_window_title'
************************************************************************************

All the best,
Alberto

Simon Billinge

unread,
Dec 20, 2022, 11:10:35 AM12/20/22
to diffpy...@googlegroups.com, Songsheng Tao
Alberto,

please can you double-check the version of matplotlib you have in your env using a `conda list` command?  The bug was fixed presumably in the 3.3.0 release of matplotlib (this is the milestone that the closed issue was part of).

Thanks so much,

S

--
You received this message because you are subscribed to the Google Groups "diffpy-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to diffpy-users...@googlegroups.com.

alberto.m...@spin.cnr.it

unread,
Dec 20, 2022, 11:19:43 AM12/20/22
to diffpy...@googlegroups.com, Songsheng Tao, Simon Billinge
Dear Simon,

Thanks to you all. These are the packages in the environment:

matplotlib 3.6.2 py38haa244fe_0 conda-forge
matplotlib-base 3.6.2 py38h528a6c7_0 conda-forge
matplotlib-inline 0.1.6 pyhd8ed1ab_0 conda-forge

Alberto

Simon Billinge

unread,
Dec 20, 2022, 3:51:03 PM12/20/22
to alberto.m...@spin.cnr.it, diffpy...@googlegroups.com, Songsheng Tao
Thanks for reporting this Alberto, this is a bug for versions of matplotlib 3.6 and higher.  We will fix the bug, but you may be able to make it work for now by lowering mpl to 3.5 or 3.4.

S

Alberto Martinelli

unread,
Dec 21, 2022, 5:44:50 AM12/21/22
to Simon Billinge, diffpy...@googlegroups.com, Songsheng Tao

Thank you Simon! Now it works with 3.4

All the best,

Alberto

Fred marlton

unread,
Mar 7, 2024, 6:57:20 PMMar 7
to diffpy-users

Hi all,

Has this bug been fixed? Or do I need to go down to mpl 3.4?
I am currently having this issue and my matplotlib is 3.7.0

Thanks,
Fred

Dylan Ladd

unread,
Mar 8, 2024, 10:57:42 AMMar 8
to diffpy-users
Hi Fred, 

As of about two weeks ago, our group still encountered this error and successfully resolved it by downgrading to mpl 3.4.

Happy Solving, 
Dylan Ladd

Fred marlton

unread,
Mar 10, 2024, 8:25:57 PMMar 10
to diffpy-users
Thanks Dylan,

Did you downgrade by doing:
pip install matplotlib==3.4.0
or
conda install matplotlib==3.4.0

Having trouble with both of these options unfortunately.

Fred

Dylan Ladd

unread,
Mar 11, 2024, 3:01:40 PMMar 11
to diffpy-users
Hi Fred, 

I'd expect the better option will be:

conda install matplotlib=3.4

The conda install will look to resolve conflicts with newer versions of mpl already installed and then confirm that you wish to replace the current mpl version. For example after the flexible solving: 


The following packages will be SUPERSEDED by a higher-priority channel:

  matplotlib         conda-forge::matplotlib-3.5.3-py37hf9~ --> pkgs/main::matplotlib-3.4.3-py37hecd8cb5_0 

  matplotlib-base    conda-forge::matplotlib-base-3.5.3-py~ --> pkgs/main::matplotlib-base-3.4.3-py37h0a11d32_0 

Proceed ([y]/n)?


I think the pip install will not go to the same lengths to replace the current mpl version, maybe causing some issues.  You may also try creating a new conda environment and install mpl 3.4 off the jump, then retry the pdfgetx3 install in that new env. 

Best of luck, 

Dylan


Reply all
Reply to author
Forward
0 new messages