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

formlayout: TypeError: QComboBox.addItems(QStringList): argument 1 has unexpected type 'list' #917

Merged
merged 1 commit into from Jun 18, 2012

Conversation

mdboom
Copy link
Member

@mdboom mdboom commented Jun 12, 2012

Clicking on the "edit curves [sic] line and axes parameters" button on a figure generated by the plot() command in the qt4 backend raises this error:

In [1]: plot(np.arange(10))
Out[1]: [<matplotlib.lines.Line2D at 0x3199b50>]

In [2]: Traceback (most recent call last):
  File "/home/mspacek/src/matplotlib/lib/matplotlib/backends/backend_qt4.py", line 519, in edit_parameters
    figureoptions.figure_edit(axes, self)
  File "/home/mspacek/src/matplotlib/lib/matplotlib/backends/qt4_editor/figureoptions.py", line 134, in figure_edit
    icon=get_icon('qt4_editor_options.svg'), apply=apply_callback)
  File "/home/mspacek/src/matplotlib/lib/matplotlib/backends/qt4_editor/formlayout.py", line 512, in fedit
    dialog = FormDialog(data, title, comment, icon, parent, apply)
  File "/home/mspacek/src/matplotlib/lib/matplotlib/backends/qt4_editor/formlayout.py", line 429, in __init__
    self.formwidget.setup()
  File "/home/mspacek/src/matplotlib/lib/matplotlib/backends/qt4_editor/formlayout.py", line 401, in setup
    widget.setup()
  File "/home/mspacek/src/matplotlib/lib/matplotlib/backends/qt4_editor/formlayout.py", line 376, in setup
    widget.setup()
  File "/home/mspacek/src/matplotlib/lib/matplotlib/backends/qt4_editor/formlayout.py", line 283, in setup
    field.addItems(value)
TypeError: QComboBox.addItems(QStringList): argument 1 has unexpected type 'list'

Histogram plots don't seem to have this problem. Editing the figure generated by hist(np.arange(10)) works fine.

This may have been triggered by 97c58d2 in #693. On second thought, that seems unlikely.

Sounds like something similar was previously reported here:

http://code.google.com/p/formlayout/issues/detail?id=4

This is with git master mpl, Qt 4.7.2, and PyQt4 4.8.3-2 on Ubuntu 11.04.

@ghost ghost assigned mdboom Jun 12, 2012
@mdboom
Copy link
Member

mdboom commented Jun 18, 2012

@mspacek: Can you confirm this resolves your issue.

@mspacek
Copy link
Contributor Author

mspacek commented Jun 18, 2012

Yes, that fixed it. Thanks!

mdboom added a commit that referenced this pull request Jun 18, 2012
formlayout: TypeError: QComboBox.addItems(QStringList): argument 1 has unexpected type 'list'
@mdboom mdboom merged commit c1fdefd into matplotlib:v1.1.x Jun 18, 2012
@mdboom mdboom deleted the qcombobox branch March 3, 2015 18:44
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

Successfully merging this pull request may close these issues.

None yet

2 participants