Closed nabobalis closed 9 years ago
@nabobalis, I just have one data point for this scenario, which is an Ubuntu 14.04 box with both qt4 and qt5 installed. ginga runs fine under both and with what appears to be equally (good) speed. I only run the qt5 version with python 3 because my understanding is that qt5 is not supported under python 2.
Are you able to run matplotlib plots with the qt5agg backend under python 3? If not, you may need to install any modules necessary to get that to work as that is what will be used for plotting under ginga/qt5.
I should note that when I run from the same code area (with both python 2 and python 3) it sometimes seems to take a bit longer to start up after a switch, as though it is byte-compiling up a bunch of modules anew. Subsequent starts with the same version of python are fast.
@nabobalis, the latest commits should have taken care of the QtGui.QCommonStyle()
error.
If you start the qt5 instance as:
export QT_API=pyqt
$ python3 scripts/ginga -t qt5 --loglevel=20 --stderr
do you still get the above errors?
@nabobalis, could you try commit 26792a5f2b7fea047c3a6b065cbc0b65aab782c4? This fixes an issue for me trying to run in the dual qt4/qt5 configuration. I believe now that I was actually running python3 with qt4 for some of the testing. I have tested with python3 and qt5 and with this commit things are working fine. I noted that at least in Ubuntu 14.04 matplotlib stable does not ship with support for qt5agg backend. I don't know the situation with Arch linux.
@ejeschke So I updated my local copy of ginga and used
export QT_API=pyqt
ginga -t qt5 --loglevel=20 --stderr <file>
Ginga opens and does not have that error anymore, but I get this,
Traceback (most recent call last):
File "/home/nabobalis/GitRepos/ginga/ginga/qtw/ImageViewQt.py", line 390, in mouseMoveEvent
self.viewer.motion_notify_event(self, event)
File "/home/nabobalis/GitRepos/ginga/ginga/qtw/ImageViewQt.py", line 629, in motion_notify_event
return self.make_callback('motion', button, data_x, data_y)
File "/home/nabobalis/GitRepos/ginga/ginga/Mixins.py", line 56, in make_callback
return super(UIMixin, self).make_callback(name, *args, **kwdargs)
File "/home/nabobalis/GitRepos/ginga/ginga/misc/Callback.py", line 88, in make_callback
name, str(e)))
File "/usr/lib/python2.7/logging/__init__.py", line 1191, in error
self._log(ERROR, msg, args, **kwargs)
File "/usr/lib/python2.7/logging/__init__.py", line 1283, in _log
record = self.makeRecord(self.name, level, fn, lno, msg, args, exc_info, func, extra)
File "/usr/lib/python2.7/logging/__init__.py", line 1257, in makeRecord
rv = LogRecord(name, level, fn, lno, msg, args, exc_info, func)
File "/usr/lib/python2.7/logging/__init__.py", line 278, in __init__
self.module = os.path.splitext(self.filename)[0]
File "/usr/lib/python2.7/posixpath.py", line 98, in splitext
return genericpath._splitext(p, sep, altsep, extsep)
File "/usr/lib/python2.7/genericpath.py", line 109, in _splitext
if p[filenameIndex] != extsep:
RuntimeError: maximum recursion depth exceeded in cmp
Then it core dumps.
Arch Matplotlib does ship with support for the qt5agg backend. Also, I can confirm that having both python-pyqt packages installed, ginga now does open without an issue.
If I recall, @Cadair had a different issue in a clean VM under Arch. We have a Ubuntu LTS server I plan to test on.
@nabobalis, I have encountered the recursion depth issue before. Ginga makes heavy use of logging and it seems that the default recursion limit of 1000 in python is not sufficient for some of the use cases in ginga.
Can you update with commit 7ea1088c46c3cd6d1e3ea3ed262adb6432fe0cf1 or later and try a couple of things and let me know the result?
1) Try running with the new --lognull
option. This replaces the python logger with a NullLogger
(essentially stubs that do nothing). Obviously running with no logging is not ideal, but this provides a quick way to troubleshoot whether logging is causing any problems.
2) Try running with a higher level of logging, like --loglevel=40
. This should only log warnings and errors.
3) Copy the general.cfg to your $HOME/.ginga
area and edit the recursion_limit
setting to something like 3000
. This ups the python default of 1000.
Glad to hear the dual qt4/qt5 setup is working.
The latest version now works with QT5 on my machine. No more errors and that slowness is now gone. Thanks @ejeschke!
Excellent news.
I had issues with Ginga not being able to load under my Arch Linux install since you can have both PyQT4 and PyQT5 with Python 2 installed at the same time.
This was the error:
To solve this, I uninstalled PyQT5 and it worked. Ginga was fast and everything loaded. When I did the reverse, so I uninstalled PyQT4, but had PyQT5 installed, Ginga became slower to load and off the master branch, Cuts did not work. It gave me these errors:
and
I want to see if anyone else has these issues, or whether this is an Arch issue.