wx.propgrid setting property editor failed.

Hi, I’m upgrading mi code to be used with wxpython phoenix and then I’ll use python 3.6, So I was trying to set a property editor but it fails

TypeError: PropertyGridInterface.SetPropertyEditor(): arguments did not match any overloaded call:

overload 1: argument 1 has unexpected type ‘unicode’
overload 2: argument 1 has unexpected type ‘unicode’

The code is the same as the documentation https://wxpython.org/Phoenix/docs/html/wx.propgrid.PGMultiButton.html, finally I used

wx version 3.0.3.dev2832+e3fbb9f

python version v2.7.13:a06454b1afa1

Can you try again with the latest snapshot? It looks like Robin has made some propgrid related fixes since that snapshot, and I can't reproduce those errors with the demo.

Scott

···

On Sun, 2 Apr 2017, sebastian lópez wrote:

Hi, I'm upgrading mi code to be used with wxpython phoenix and then I'll
use python 3.6, So I was trying to set a property editor but it fails
TypeError: PropertyGridInterface.SetPropertyEditor(): arguments did not
match any overloaded call:
overload 1: argument 1 has unexpected type 'unicode'
overload 2: argument 1 has unexpected type 'unicode'

The code is the same as the documentation
wx.propgrid.PGMultiButton — wxPython Phoenix 4.2.3a1 documentation,
finally I used

wx version 3.0.3.dev2832+e3fbb9f
python version v2.7.13:a06454b1afa1

Hi, I tryed the propertygrid example related to wx version 3.0.3.dev2875+9b743cf and I got this

···

================

*** Mon Apr 03 07:02:22 2017 ***

Traceback (most recent call last):

File “”, line 189, in DoSetAttribute

wxAssertionError: C++ assertion “Assert failure” failed at …..\src\common\variant.cpp(837) in wxVariant::GetChar(): Could not convert to a char

*** Mon Apr 03 07:02:44 2017 ***

Traceback (most recent call last):

File “”, line 189, in DoSetAttribute

wxAssertionError: C++ assertion “Assert failure” failed at …..\src\common\variant.cpp(837) in wxVariant::GetChar(): Could not convert to a char

*** Mon Apr 03 07:03:02 2017 ***

Traceback (most recent call last):

File “”, line 189, in DoSetAttribute

wxAssertionError: C++ assertion “Assert failure” failed at …..\src\common\variant.cpp(837) in wxVariant::GetChar(): Could not convert to a char

*** Mon Apr 03 07:03:09 2017 ***

Traceback (most recent call last):

File “”, line 183, in ValueToString

AttributeError: ‘DirsProperty’ object has no attribute ‘m_display’

==================================================

In the other hand if I try to use my custom PGEditors the app silently crash, so I’m preparing a minimal example to be uploading.

El domingo, 2 de abril de 2017, 19:28:50 (UTC-5), Scott Talbert escribió:

On Sun, 2 Apr 2017, sebastian lópez wrote:

Hi, I’m upgrading mi code to be used with wxpython phoenix and then I’ll

use python 3.6, So I was trying to set a property editor but it fails

TypeError: PropertyGridInterface.SetPropertyEditor(): arguments did not

match any overloaded call:

overload 1: argument 1 has unexpected type ‘unicode’

overload 2: argument 1 has unexpected type ‘unicode’

The code is the same as the documentation

https://wxpython.org/Phoenix/docs/html/wx.propgrid.PGMultiButton.html,

finally I used

wx version 3.0.3.dev2832+e3fbb9f

python version v2.7.13:a06454b1afa1

Can you try again with the latest snapshot? It looks like Robin has made
some propgrid related fixes since that snapshot, and I can’t reproduce
those errors with the demo.

Scott

I also made some interactive test by trying to Register a LargeImageEditor but I have the following

>>>” means interactive shell

>>> editor

<class ‘easyDialog.easyDialog.LargeImageEditor’>

>>> editor.bases

(<class ‘wx._propgrid.PGEditor’>,)

>>> type(editor)

<type ‘sip.wrappertype’>

>>> wx.propgrid.PropertyGrid.RegisterEditorClass(editor)

Traceback (most recent call last):

Debug Probe, prompt 55, line 1

TypeError: PropertyGrid.RegisterEditorClass(): argument 1 has unexpected type ‘sip.wrappertype’

The code above was test with

wx version 3.0.3.dev2875+9b743cf

python version v2.7.13:a06454b1afa1

propgridfail.py (3.65 KB)

···

El lunes, 3 de abril de 2017, 7:13:49 (UTC-5), sebastian lópez escribió:

Hi, I tryed the propertygrid example related to wx version 3.0.3.dev2875+9b743cf and I got this

================

*** Mon Apr 03 07:02:22 2017 ***

Traceback (most recent call last):

File “”, line 189, in DoSetAttribute

wxAssertionError: C++ assertion “Assert failure” failed at …..\src\common\variant.cpp(837) in wxVariant::GetChar(): Could not convert to a char

*** Mon Apr 03 07:02:44 2017 ***

Traceback (most recent call last):

File “”, line 189, in DoSetAttribute

wxAssertionError: C++ assertion “Assert failure” failed at …..\src\common\variant.cpp(837) in wxVariant::GetChar(): Could not convert to a char

*** Mon Apr 03 07:03:02 2017 ***

Traceback (most recent call last):

File “”, line 189, in DoSetAttribute

wxAssertionError: C++ assertion “Assert failure” failed at …..\src\common\variant.cpp(837) in wxVariant::GetChar(): Could not convert to a char

*** Mon Apr 03 07:03:09 2017 ***

Traceback (most recent call last):

File “”, line 183, in ValueToString

AttributeError: ‘DirsProperty’ object has no attribute ‘m_display’

==================================================

In the other hand if I try to use my custom PGEditors the app silently crash, so I’m preparing a minimal example to be uploading.

El domingo, 2 de abril de 2017, 19:28:50 (UTC-5), Scott Talbert escribió:

On Sun, 2 Apr 2017, sebastian lópez wrote:

Hi, I’m upgrading mi code to be used with wxpython phoenix and then I’ll

use python 3.6, So I was trying to set a property editor but it fails

TypeError: PropertyGridInterface.SetPropertyEditor(): arguments did not

match any overloaded call:

overload 1: argument 1 has unexpected type ‘unicode’

overload 2: argument 1 has unexpected type ‘unicode’

The code is the same as the documentation

https://wxpython.org/Phoenix/docs/html/wx.propgrid.PGMultiButton.html,

finally I used

wx version 3.0.3.dev2832+e3fbb9f

python version v2.7.13:a06454b1afa1

Can you try again with the latest snapshot? It looks like Robin has made
some propgrid related fixes since that snapshot, and I can’t reproduce
those errors with the demo.

Scott

The method is named rather confusingly, what you need to pass there is an instance of the LargeIMageEditor class, not the class itself. Also you probably should have a wx.App object created before you try doing things like this.

Robin

···

On Monday, April 3, 2017 at 10:11:58 AM UTC-7, sebastian lópez wrote:

>>> type(editor)

<type ‘sip.wrappertype’>

>>> wx.propgrid.PropertyGrid.RegisterEditorClass(editor)

Traceback (most recent call last):

Debug Probe, prompt 55, line 1

TypeError: PropertyGrid.RegisterEditorClass(): argument 1 has unexpected type ‘sip.wrappertype’

You’re rigth, now it’s working

Thank’s

···

El lunes, 3 de abril de 2017, 14:28:22 (UTC-5), Robin Dunn escribió:

On Monday, April 3, 2017 at 10:11:58 AM UTC-7, sebastian lópez wrote:

>>> type(editor)

<type ‘sip.wrappertype’>

>>> wx.propgrid.PropertyGrid.RegisterEditorClass(editor)

Traceback (most recent call last):

Debug Probe, prompt 55, line 1

TypeError: PropertyGrid.RegisterEditorClass(): argument 1 has unexpected type ‘sip.wrappertype’

The method is named rather confusingly, what you need to pass there is an instance of the LargeIMageEditor class, not the class itself. Also you probably should have a wx.App object created before you try doing things like this.

Robin