[NumPy-Tickets] [NumPy] #1583: fromfile/tofile py3k errors on Windows

NumPy Trac numpy-tickets@scipy....
Mon Aug 23 19:22:40 CDT 2010

#1583: fromfile/tofile py3k errors on Windows
 Reporter:  rgommers                |       Owner:  somebody
     Type:  defect                  |      Status:  new     
 Priority:  high                    |   Milestone:  1.5.0   
Component:  numpy.core              |     Version:  devel   
 Keywords:  fromfile, tofile, py3k  |  
Changes (by cgohlke):

 * cc: cgohlke@… (added)


 I could reproduce this with MinGW 5.1.6.

 The function call "fdopen(fd2, mode)" in line 181 of npy_3kcompat.h
 returns NULL even though the input parameters seem correct. As a
 consequence the result of the npy_PyFile_Dup call in line 1694 of
 multiarraymodule.c is NULL and the exception is raised.

 Could this be related to mixing two different C runtime libraries:
 msvcrt90/Python and msvcrt/mingw? Even though the -lmsvcr90 linker option
 is set, the resulting pyd files depend on the two runtime dlls.

 I'll try the get_osfhandle workaround mentioned at

Ticket URL: <http://projects.scipy.org/numpy/ticket/1583#comment:2>
NumPy <http://projects.scipy.org/numpy>
My example project

More information about the NumPy-Tickets mailing list