<div dir="ltr"><div class="gmail_extra">The issue is solved in Python 2.7.12 from 2016-06-25.<br><br><a href="https://hg.python.org/cpython/raw-file/v2.7.12/Misc/NEWS" target="_blank">https://hg.python.org/cpython/<wbr>raw-file/v2.7.12/Misc/NEWS</a><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Dec 7, 2016 at 6:59 PM, Michael Barton <span dir="ltr"><<a href="mailto:Michael.Barton@asu.edu" target="_blank">Michael.Barton@asu.edu</a>></span> wrote:<br><blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex" class="gmail_quote">We need to do something other than update Python.</blockquote><div><br></div><div>There is not that much which can be done on the GRASS site. According to Python issue #26083, the root of the problem is in Mac OS read() which causes pre-2.7.12 subprocess package to fail on anything longer than 512 bytes when piping is used (significant part of GRASS Python code in GUI, lib and modules). We can workaround it (example below causing other things to fail), included fixed subprocess code in GRASS or switch to subprocess32. None of these is feasible for 7.2 and they are not even worth it considering that the fixed Python was released.</div><div><br></div></div></div><div class="gmail_extra">Example workaround (not recommended):<br></div><div class="gmail_extra"><br>Index: gui/wxpython/core/toolboxes.py<br>==============================<wbr>==============================<wbr>=======<br>--- gui/wxpython/core/toolboxes.<wbr>py    (revision 70036)<br>+++ gui/wxpython/core/toolboxes.<wbr>py    (working copy)<br>@@ -670,8 +670,20 @@<br>     try:<br>         task = gtask.parse_interface(module)<br>     except ScriptError as e:<br>+        # This tries to solve failed build or run of a module<br>         sys.stderr.write("%s: %s\n" % (module, e))<br>         return '', ''<br>+    except ValueError as e:<br>+        # This is testing for Python's #26083 on Mac OS.<br>+        # <a href="http://bugs.python.org/issue26083" target="_blank">http://bugs.python.org/<wbr>issue26083</a><br>+        # The whole except ValueError should be removed once it<br>+        # is fixed in Python (likely 2.7.12) or subprocess32 is used.<br>+        from sys import platform<br>+        if platform == "darwin":<br>+            sys.stderr.write("%s: %s\n" % (module, e))<br>+            return '', ''<br>+        # raise exception again on other platforms<br>+        raise<br> <br>     return task.get_description(full=<wbr>True), \<br>         task.get_keywords()<br><br></div></div>