hyperspy/hyperspyUI

Can not open plugin manager

erh3cq opened this issue · 7 comments

Click on settings->plugin manager and get the below error. Seems to dislike QT4, is there a way around this? I am running pyqt 4.11. I can not open the UI with the newest 5. version.

Traceback (most recent call last):
  File "c:\users\ericho~1\documents\github\hyperspyui\hyperspyui\mainwindow.py", line 375, in show_plugin_manager
    self.plugin_manager, self)
  File "c:\users\ericho~1\documents\github\hyperspyui\hyperspyui\widgets\pluginmanagerwidget.py", line 131, in __init__
    self.create_controls()
  File "c:\users\ericho~1\documents\github\hyperspyui\hyperspyui\widgets\pluginmanagerwidget.py", line 152, in create_controls
    h.setResizeMode(QHeaderView.ResizeToContents)
  File "C:\Users\Eric Hoglund\Anaconda3\envs\data-analysis\lib\site-packages\qtpy\_patch\qheaderview.py", line 83, in setResizeMode
    raise Exception('setResizeMode is only available in Qt4. Use '
Exception: setResizeMode is only available in Qt4. Use setSectionResizeMode instead.

What is your version of qtpy (not pyqt)? Considering that the error comes from that package, I would say it is the most likely suspect.

1.2.1, showing that it is the most current version. Do I need to down grade?

Actually, I don't understand why qtpy gets imported at all. Is this a dependency of hyperspy now?

It is not a dependency of hyperSpy. The third to last line suggests HyperspyUI is calling qtpy:
\hyperspyui\widgets\pluginmanagerwidget.py", line 152, in create_controls h.setResizeMode(QHeaderView.ResizeToContents)

The UI definitely uses PyQt, but as far as I know, nothing depends on qtpy. Maybe you have a plugin that import qtpy?

Is this resolved after #150?

Fixed in #162.