[PyQt] Qstring and encode
Phil
phil_lor at bigpond.com
Mon Sep 25 21:37:52 BST 2017
On 25/09/17 21:42, Kyle Altendorf wrote:
Thank you Kyle and Detlev for your replies. This was another of those
messages that I probably shouldn't have posted.
> Perhaps they are running different copies of Python?
Yes, and I'm silly old bugger for not realising it sooner.
>> TypeError: string argument without an encoding
>
> This is bytes complaining about you not giving it an encoding.
>
> byte = bytes(mytext, encoding='ascii')
>
> https://docs.python.org/3/library/stdtypes.html#bytes
Thank you, I eventually discovered this after hours of searching.
--
Regards,
Phil
More information about the PyQt
mailing list