[PyQt] Unable to connect signals to Python slots with non-ASCII names

Florian Bruhin me at the-compiler.org
Mon Dec 11 05:37:30 GMT 2017


On Mon, Dec 11, 2017 at 08:28:11AM +0530, Shriramana Sharma wrote:
> Hello. This is related to my recent post. I'm using PyQt
> 5.5.1+dfsg-3ubuntu4 with Py 3.5.1-3 default on Kubuntu Xenial 64 bit.
> I'm using non-ASCII words for user-defined
> variables and methods. Actually it's in an Indic script but for
> readers' convenience as minimal example I give the attached code with
> French.
> 
> I am connecting a signal to a Python method with non-ASCII name.
> Trying to execute the app results in a segfault. The fix is to replace
> the function name (as in line 9) with a bare lambda that calls the
> function (commented in line 10).

I can reproduce that with PyQt 5.9 and get:

  ASSERT: "f_name" in file ../qpy/QtCore/qpycore_pyqtboundsignal.cpp, line 810

When decorating it with @pyqtSlot, I get:

  UnicodeEncodeError: 'ascii' codec can't encode character '\xe9' in position 1: ordinal not in range(128)

Florian

-- 
https://www.qutebrowser.org  | me at the-compiler.org (Mail/XMPP)
   GPG: 916E B0C8 FD55 A072  | https://the-compiler.org/pubkey.asc
         I love long mails!  | https://email.is-not-s.ms/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20171211/e60eb330/attachment.sig>


More information about the PyQt mailing list