traceback using at_produce.py plugin

15 views
Skip to first unread message

lewis

unread,
May 15, 2017, 7:31:54 AM5/15/17
to leo-editor
I get this traceback with at_produce.py plugin running at-produce-selected command on a node:

Leo 5.5, build 20170514184942, Sun May 14 18:49:42 CDT 2017
Git repo info: branch = master, commit = 326e94863831
Python 3.6.1, PyQt version 5.8.0
Windows 10 AMD64 (build 10.0.15063) SP0
reading settings in N:\leo\produce_test.leo
Exception in thread Thread-1:
Traceback (most recent call last):
  File "C:\Users\lewis\AppData\Local\Programs\Python\Python36\lib\threading.py", line 916, in _bootstrap_inner
    self.run()
  File "C:\Users\lewis\AppData\Local\Programs\Python\Python36\lib\threading.py", line 864, in run
    self._target(*self._args, **self._kwargs)
  File "N:\git\leo-editor\leo\plugins\at_produce.py", line 90, in thread_target
    runList(c,aList)
  File "N:\git\leo-editor\leo\plugins\at_produce.py", line 137, in runList
    shell=True,
  File "C:\Users\lewis\AppData\Local\Programs\Python\Python36\lib\subprocess.py", line 622, in __init__
    "close_fds is not supported on Windows platforms"
ValueError: close_fds is not supported on Windows platforms if you redirect stdin/stdout/stderr

at-produce: done
[end]

Regards
Lewis

Edward K. Ream

unread,
May 15, 2017, 7:47:11 AM5/15/17
to leo-editor
On Mon, May 15, 2017 at 6:31 AM, lewis <lewi...@operamail.com> wrote:
I get this traceback with at_produce.py plugin running at-produce-selected command on a node:
​...​
 
 
File "N:\git\leo-editor\leo\plugins\at_produce.py", line 137, in runList
    shell=True,
  File "C:\Users\lewis\AppData\Local\Programs\Python\Python36\lib\subprocess.py", line 622, in __init__
    "close_fds is not supported on Windows platforms"
ValueError: close_fds is not supported on Windows platforms if you redirect stdin/stdout/stderr

​ce217ef removes this keyword arg.  I'm not sure this is a valid fix.  Please report your experiences.

Edward

lewis

unread,
May 15, 2017, 8:14:09 AM5/15/17
to leo-editor
running ce217ef

[snip] Exception in thread Thread-1:
Traceback (most recent call last):
  File "C:\Users\lewis\AppData\Local\Programs\Python\Python36\lib\threading.py", line 916, in _bootstrap_inner
    self.run()
  File "C:\Users\lewis\AppData\Local\Programs\Python\Python36\lib\threading.py", line 864, in run
    self._target(*self._args, **self._kwargs)
  File "N:\git\leo-editor\leo\plugins\at_produce.py", line 90, in thread_target
    runList(c,aList)
  File "N:\git\leo-editor\leo\plugins\at_produce.py", line 142, in runList
    f.write( txt )
TypeError: write() argument must be str, not bytes

at-produce: done

Lewis

Edward K. Ream

unread,
May 15, 2017, 10:22:30 AM5/15/17
to leo-editor
On Mon, May 15, 2017 at 7:14 AM, lewis <lewi...@operamail.com> wrote:
running ce217ef

  File "N:\git\leo-editor\leo\plugins\at_produce.py", line 142, in runList
    f.write( txt )
TypeError: write() argument must be str, not bytes

​This should be fixed at 9388fc4, although perhaps it might fail on Python 2...

Anyone, including GvR, who thinks the split between Python 2 and 3 isn't expensive on a daily basis, is sadly mistaken.

Edward​
 
Reply all
Reply to author
Forward
0 new messages