我正在通过 sh 模块运行 Python 脚本,它在执行过程中崩溃。崩溃时,它给了我 stderr 前几行的读数,但它告诉我还有更多错误,我应该看到 e.stderr,但我不知道该怎么做,因为我不知道知道 e 是什么。如何访问我的 stderr 文件的其余部分?谢谢。
编辑:这是错误:
STDERR:
mydir/test.py:22: UserWarning: gzip transfer encoding is experimental!
br.set_handle_gzip(True)
Traceback (most recent call last):
File "mydir/test.py", line 142, in <module>
run(sys.argv[1]);
File "mydir/test.py", line 13, in run
scrape(browser,folderName);
File "mydir/test.py", line 46, in scrape
processResponse(browser,folderName,1);
File "mydir/test.py", line 121, in processResponse
urllib.urlencode(data));
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/mechanize-0.2.6.dev_20130122-py2.7.egg/mechanize/_mechanize.py", line 203, in open
return self._mech_open(url, data, timeout=timeout)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-pac... (4278 more, please see e.stderr)