From: Ted D. <ted...@jp...> - 2005-04-28 03:02:58
|
What was the backend set to? We've seen messages like this from the Qt library (just in our normal C++ work). Qt needs to connect to an X server before it can do pretty much anything (I presume that it needs fonts, colors, etc). Just importing some of the backends may build certain objects (like QApplication in the case of Qt) which may need an X server. I realize this doesn't actually help you - it's more of an explanation. If it is Qt that you're using and this is the cause (neither of which I'm sure of), there may not be a good fix. In our application we tried building the QApplication with the GUI flag set to false (which stops the X server connection) but then if someone tries to do display anything it core dumps - not a very good behavior. Ted At 07:04 PM 4/27/2005, Darren Dale wrote: >Hi Rich, > >What happens if you run the script on a windows machine, no ssh? > >Darren > > >On Wednesday 27 April 2005 9:28 pm, Rich Drewes wrote: > > I should add that we were both ssh'd into a Linux machine, he from Windows > > and I from Linux. So his DISPLAY was not set and mine was. When he ran > > the script it failed for him, but worked for me, even though the script > > only did a savefig and never tried to actually show() anything to a > > screen. Is that expected behavior? > > > > Rich > > > > On Wed, 27 Apr 2005, Rich Drewes wrote: > > > Hello, > > > > > > I gave a colleague a matplotlib script that generated a .ps output with > > > savefig, and was surprised when it didn't work for him. I eventually > > > figured out that since he was a Windows user and didn't have DISPLAY set, > > > the import of the matplotlib libraries was failing with the error in this > > > message's subject. I eventually solved the problem by doing > > > "matplotlib.use('PS')" before the pylab import. > > > > > > However, the script never tried to actually display anything, it only > > > created the plot and did a savefig at the end. So my question is: is > > > this "could not open display" behavior at import the way things are > > > supposed to work, or is this a bug? It seems like it would be better to > > > hold off on the "could not open display" error until someone actually > > > tried to display something, and if all they did was savefigs, everything > > > would work fine. > > > > > > This is on matplotlib .80. > > > > > > Thanks, > > > Rich > > > > > > > > > ------------------------------------------------------- > > > SF.Net email is sponsored by: Tell us your software development plans! > > > Take this survey and enter to win a one-year sub to SourceForge.net > > > Plus IDC's 2005 look-ahead and a copy of this survey > > > Click here to start! http://www.idcswdc.com/cgi-bin/survey?id=105hix > > > _______________________________________________ > > > Matplotlib-users mailing list > > > Mat...@li... > > > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > > > ------------------------------------------------------- > > SF.Net email is sponsored by: Tell us your software development plans! > > Take this survey and enter to win a one-year sub to SourceForge.net > > Plus IDC's 2005 look-ahead and a copy of this survey > > Click here to start! http://www.idcswdc.com/cgi-bin/survey?id=105hix > > _______________________________________________ > > Matplotlib-users mailing list > > Mat...@li... > > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > >-- >Darren S. Dale > >Bard Hall >Department of Materials Science and Engineering >Cornell University >Ithaca, NY. 14850 > >dd...@co... > > >------------------------------------------------------- >SF.Net email is sponsored by: Tell us your software development plans! >Take this survey and enter to win a one-year sub to SourceForge.net >Plus IDC's 2005 look-ahead and a copy of this survey >Click here to start! http://www.idcswdc.com/cgi-bin/survey?id=105hix >_______________________________________________ >Matplotlib-users mailing list >Mat...@li... >https://lists.sourceforge.net/lists/listinfo/matplotlib-users |