Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Another styles plugin issue #139

Open
thomasaarholt opened this issue Apr 22, 2017 · 4 comments
Open

Another styles plugin issue #139

thomasaarholt opened this issue Apr 22, 2017 · 4 comments

Comments

@thomasaarholt
Copy link
Contributor

Error shown during launch of hyperspyui.
I think this occured after I saved the styles within the plugin, but I am unsure:

DEBUG:hyperspyui:Initializing plugin: <class 'hyperspyui.plugins.stylesheet.StylePlugin'>
/Users/thomas/Dropbox/0_Git/hyperspyUI/hyperspyui/pluginmanager.py:248: RuntimeWarning: Exception in load of hyperspyui plugin "<class 'hyperspyui.plugins.stylesheet.StylePlugin'>" error:
  File "/Users/thomas/Dropbox/0_Git/hyperspyUI/hyperspyui/pluginmanager.py", line 230, in _load_if_enabled
    p = p_type(self.ui)
  File "/Users/thomas/Dropbox/0_Git/hyperspyUI/hyperspyui/plugins/stylesheet.py", line 49, in __init__
    self.apply_styles()
  File "/Users/thomas/Dropbox/0_Git/hyperspyUI/hyperspyui/plugins/stylesheet.py", line 63, in apply_styles
    QApplication.setPalette(QPalette(palette))
TypeError: QPalette(): argument 1 has unexpected type 'str'

  self.warn(sys._getframe().f_code.co_name, plugin_type)
@vidartf
Copy link
Member

vidartf commented Apr 24, 2017

Fixed in master (9de9f8d).

@vidartf vidartf closed this as completed Apr 24, 2017
@vidartf
Copy link
Member

vidartf commented Apr 24, 2017

Oh, I screwed up (drive by coding is never good).

@vidartf vidartf reopened this Apr 24, 2017
@vidartf
Copy link
Member

vidartf commented Apr 24, 2017

Could you call the following in the Console, and open the file specified:

from PyQt4 import QtCore
QtCore.QSettings(parent=ui).fileName()

If you could copy the value of the setting under 'General' called '_palette', and paste it here.

@vidartf
Copy link
Member

vidartf commented Apr 24, 2017

No, not 'General._palette', 'plugins.Style._palette'...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants