Oserror python 3.5.4 when you win 10 1709 when using nosetest or print

Since I updated my version 1050 from 1703 to version 1709 (Fall Update), I have a persistent OSError problem when using the print or nose command. My journal with nose :

 ====================================================================== ERROR: test_future_link_to_update_3 ---------------------------------------------------------------------- Traceback (most recent call last): File "c:\users\sdn\work\git\pop-extrapole\env\lib\site-packages\nose\case.py", line 134, in run self.runTest(result) File "c:\users\sdn\work\git\pop-extrapole\env\lib\site-packages\nose\case.py", line 152, in runTest test(result) File "c:\program files\python35\Lib\unittest\case.py", line 653, in __call__ return self.run(*args, **kwds) File "c:\program files\python35\Lib\unittest\case.py", line 621, in run result.addSuccess(self) File "c:\users\sdn\work\git\pop-extrapole\env\lib\site-packages\nose\proxy.py", line 165, in addSuccess self.result.addSuccess(self.test) File "c:\program files\python35\Lib\unittest\runner.py", line 64, in addSuccess self.stream.flush() OSError: raw write() returned invalid length 2 (should have been between 0 and 1) 

I can convey this problem by commenting on self.stream.flush() , but this is not a solution:

 def addSuccess(self, test): super(TextTestResult, self).addSuccess(test) if self.showAll: self.stream.writeln("ok") elif self.dots: self.stream.write('.') # self.stream.flush() 

Another log when using print :

 Traceback (most recent call last): File "c:\program files\python35\Lib\multiprocessing\pool.py", line 119, in worker result = (True, func(*args, **kwds)) File "c:\program files\python35\Lib\multiprocessing\pool.py", line 47, in starmapstar return list(itertools.starmap(args[0], args[1])) File "C:\Users\SDN\Work\git\pop-extrapole\extrapolation\extrapole.py", line 1463, in popcorn_process print(lk) OSError: raw write() returned invalid length 46 (should have been between 0 and 23) 

Does anyone have any ideas about this?

Thanks Uwevil

+5
source share
2 answers

Do you use bash for "Git for Windows"?

If you are using, try adding administrator privileges to the \Program Files\Git\git-bash.exe and \Program Files\Git\usr\bin\bash.exe .

I could solve it. But I think this is not the best solution.

And another solution is to use PowerShell.

0
source

I think this problem seems to be handled by updating python 3.5.4 to python 3.6.4 in accordance with this thread: https://bugs.python.org/issue32245

0
source

Source: https://habr.com/ru/post/1273081/


All Articles