diff --git a/nbconvert/writers/stdout.py b/nbconvert/writers/stdout.py
index 5fb685005..8ed2dcc3b 100644
--- a/nbconvert/writers/stdout.py
+++ b/nbconvert/writers/stdout.py
@@ -22,4 +22,4 @@ def write(self, output, resources, **kw):
         """
         stream = io.unicode_std_stream()
         stream.write(output)
-        stream.stream.close()
+        stream.close()
diff --git a/tests/utils/test_io.py b/tests/utils/test_io.py
index 958d1e0a5..985ba1673 100644
--- a/tests/utils/test_io.py
+++ b/tests/utils/test_io.py
@@ -21,7 +21,7 @@ def test_UnicodeStdStream():
         sample = "@łe¶ŧ←"
         stream = unicode_std_stream()
         stream.write(sample)
-        stream.stream.close()
+        stream.close()
 
         output = stdoutb.getvalue().decode("utf-8")
         assert output == sample