Uploaded image for project: 'Apache Arrow'
  1. Apache Arrow
  2. ARROW-866

[Python] Error from file object destructor

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 0.3.0
    • Python
    • None

    Description

      Related to ARROW-822

      In [1]: paste
      import pyarrow as pa
      import socket, os, io
      
      server = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
      server.bind(('127.0.0.1', 0))
      server.listen(1)
      host, port = server.getsockname()
      
      sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
      sock.connect(('127.0.0.1', port))
      
      sink = os.fdopen(sock.fileno(), "wb", 65536)
      field = pa.Field.from_py("f1", pa.float32())
      schema = pa.Schema.from_fields([field])
      
      writer = pa.StreamWriter(sink, schema)
      ## -- End pasted text --
      
      In [2]: 
      Do you really want to exit ([y]/n)? y
      close failed in file object destructor:
      IOError: [Errno 9] Bad file descriptor
      
      If you suspect this is an IPython bug, please report it at:
          https://github.com/ipython/ipython/issues
      or send an email to the mailing list at ipython-dev@scipy.org
      
      You can print a more detailed traceback right now with "%tb", or use "%debug"
      to interactively debug it.
      
      Extra-detailed tracebacks for bug-reporting purposes can be enabled via:
          %config Application.verbose_crash=True
      

      Attachments

        Issue Links

          Activity

            People

              wesm Wes McKinney
              wesm Wes McKinney
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Slack

                  Issue deployment