[Tutor] PySide 1.2.2 and Python 3 - "native Qt signal is not callable"

Juan Christian juan0christian at gmail.com
Sun Aug 31 00:18:52 CEST 2014


I analyzed the code and found two mistakes:

1. I wrote 'startsWith', and not 'startswith'
2. I forgot to encode, I needed to use '.read().decode("utf-8")' rather
than '.read()' only.

This way I get the text correctly (http://pastebin.com/qy4SVdzK). I'm still
analyzing the code and fixing things, the program isn't 100% working yet.






2014-08-30 19:03 GMT-03:00 Danny Yoo <dyoo at hashcollision.org>:

> > So the loop really should be:
> >
> >         for line in fh.split("\n"):
> >               ...
>
>
> Ah, apologies.  Forgot that we're in Python 3 land.  We have to be
> consistent with the types a lot more.  This should be:
>
>          for line in fh.split(b"\n"):
>                ...
>
> Apologies.  I should have tested with a Python 3 interpreter in hand.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20140830/88462cbb/attachment.html>


More information about the Tutor mailing list