tuneconfig() error

62 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

Reply all
Reply to author
Forward
0 new messages