On Fri, 2 Feb 2018 05:30:12 -0800 (PST)
"Edward K. Ream" <edream...@gmail.com> wrote:
> > "C:\Users\lewis\AppData\Local\Programs\Python\Python36\lib\socketserver.py",
> > line 775, in write
> > self._sock.sendall(b)
> > TypeError: a bytes-like object is required, not 'str'
> > Can you explain how to identify the str structure so I can apply
> > the change?
> The culprit appears to be that b is a str, not a bytes.
> The great thing about Python is that you have full access to most of
> the Python libs. Open socketserver.py in your favorite text editor,
> and look at the context of the error. That may be enough.
> Otherwise, you can add debugging code to socketserver.py as follows:
> 1. Before changing anything, init a git repo for the folder
> containing socketserver.py. Git will give you diffs, and you can
> revert your changes later with git checkout socketserver.py. This is
> important protection for your system.
Going to go out on a limb here and suggest the problem may lie
in a ten year old Leo plugin that never considered Python 3, rather
than in one of the Python core libraries (@Edward ;-) So rather than
altering Python core libraries on your system, look for str / byte
issues further up the traceback.
line 184, in do_GET
Python is truncating the excessively long line, which in full reads:
and should read
although turns out that module doesn't know about Leo / import g, so instead:
I've made the necessary changes in
Thanks Lewis for reminding me about this plugin, it's kind of cool -
glad the google API part still works, had wondered if that might no
longer be supported on the google end.
You received this message because you are subscribed to the Google Groups
To unsubscribe from this group and stop receiving emails from it, send an email
To post to this group, send email to firstname.lastname@example.org.
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.