打开终端时,提示I/O operation on closed file错误

114 views
Skip to first unread message

photon

unread,
Oct 6, 2012, 10:12:08 PM10/6/12
to wowu...@googlegroups.com
之前使用ubuntu的自带的terminal时,没有任何问题,但是今早在使用ubuntu时,每次打开terminal,都会出现I/O operation on closed file错误,使用terminator时也是这个错误,重启后问题依旧,不知道该如何解决?

具体错误信息如下:
Traceback (most recent call last):
  File "/usr/lib/python2.6/logging/handlers.py", line 72, in emit
    self.doRollover()
  File "/usr/lib/python2.6/logging/handlers.py", line 129, in doRollover
    os.rename(self.baseFilename, dfn)
OSError: [Errno 13] Permission denied
Traceback (most recent call last):
  File "/usr/lib/python2.6/logging/handlers.py", line 71, in emit
    if self.shouldRollover(record):
  File "/usr/lib/python2.6/logging/handlers.py", line 145, in shouldRollover
    self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature
ValueError: I/O operation on closed file
Traceback (most recent call last):
  File "/usr/lib/python2.6/logging/handlers.py", line 71, in emit
    if self.shouldRollover(record):
  File "/usr/lib/python2.6/logging/handlers.py", line 145, in shouldRollover
    self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature
ValueError: I/O operation on closed file
Traceback (most recent call last):
  File "/usr/lib/python2.6/logging/handlers.py", line 71, in emit
    if self.shouldRollover(record):
  File "/usr/lib/python2.6/logging/handlers.py", line 145, in shouldRollover
    self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature
ValueError: I/O operation on closed file
Traceback (most recent call last):
  File "/usr/lib/python2.6/logging/handlers.py", line 71, in emit
    if self.shouldRollover(record):
  File "/usr/lib/python2.6/logging/handlers.py", line 145, in shouldRollover
    self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature
ValueError: I/O operation on closed file
Error in atexit._run_exitfuncs:
Traceback (most recent call last):
  File "/usr/lib/python2.6/atexit.py", line 24, in _run_exitfuncs
    func(*targs, **kargs)
  File "/usr/lib/python2.6/logging/__init__.py", line 1508, in shutdown
    h.flush()
  File "/usr/lib/python2.6/logging/__init__.py", line 754, in flush
    self.stream.flush()
ValueError: I/O operation on closed file
Error in sys.exitfunc:
Traceback (most recent call last):
  File "/usr/lib/python2.6/atexit.py", line 24, in _run_exitfuncs
    func(*targs, **kargs)
  File "/usr/lib/python2.6/logging/__init__.py", line 1508, in shutdown
    h.flush()
  File "/usr/lib/python2.6/logging/__init__.py", line 754, in flush
    self.stream.flush()
ValueError: I/O operation on closed file
linnan@#ubuntu:~$ 

Xilin Sun

unread,
Oct 6, 2012, 10:30:41 PM10/6/12
to wowu...@googlegroups.com
看了一下網上搜到的東西,似乎是和 Python 3 的特性有關。

On 7 October 2012 10:12, photon <linn...@gmail.com> wrote:
> 之前使用ubuntu的自带的terminal时,没有任何问题,但是今早在使用ubuntu时,每次打开terminal,都会出现I/O operation
> on closed file错误,使用terminator时也是这个错误,重启后问题依旧,不知道该如何解决?

--
May the source be with you.

孙锡麟,SUN Xilin, undergraduate student at HKPolyU

Lin Nan

unread,
Oct 6, 2012, 10:37:09 PM10/6/12
to wowu...@googlegroups.com
不过我的ubuntu是10.04版本的,默认装的是python2.6,我又装了python 2.7。没装python3.0

--Life Without Danger Is A Waste of Oxygen




Reply all
Reply to author
Forward
0 new messages