<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class=""><br class=""></div><br class=""><div><blockquote type="cite" class=""><div class="">On Sep 7, 2015, at 11:48 PM, Gelin Yan <<a href="mailto:dynamicgl@gmail.com" class="">dynamicgl@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class="">Hi All<div class=""><br class=""></div><div class="">    I just noticed my app raised an exception such as</div><div class=""><br class=""></div><div class=""><p class=""><span class="">Traceback (most recent call last):</span></p><p class=""><span class="">  File "/home/m/py343/lib/python3.4/runpy.py", line 170, in _run_module_as_main</span></p><p class=""><span class="">    "__main__", mod_spec)</span></p><p class=""><span class="">  File "/home/m/py343/lib/python3.4/runpy.py", line 85, in _run_code</span></p><p class=""><span class="">    exec(code, run_globals)</span></p><p class=""><span class="">  File "gw_go.zip/__main__.py", line 8, in <module></span></p><p class=""><span class="">  File "gw_go.zip/gw_server2/gw_go.py", line 87, in main</span></p><p class=""><span class="">  File "/home/m/py343/lib/python3.4/site-packages/twisted/python/logfile.py", line 48, in fromFullPath</span></p><p class=""><span class="">    os.path.dirname(logPath), *args, **kwargs)</span></p><p class=""><span class="">  File "/home/m/py343/lib/python3.4/site-packages/twisted/python/logfile.py", line 40, in __init__</span></p><p class=""><span class="">    self._openFile()</span></p><p class=""><span class="">  File "/home/m/py343/lib/python3.4/site-packages/twisted/python/logfile.py", line 238, in _openFile</span></p><p class=""><span class="">    BaseLogFile._openFile(self)</span></p><p class=""><span class="">  File "/home/m/py343/lib/python3.4/site-packages/twisted/python/logfile.py", line 75, in _openFile</span></p><p class=""><span class="">    self._file = file(self.path, "w+", 1)</span></p><p class=""><span class="">NameError: name 'file' is not defined</span></p><p class=""><span class=""><br class=""></span></p><p class=""><span class="">     I used python 3.4 and twisted 15.40 (from pip) under ubuntu 14.04.</span></p></div></div></div></blockquote><br class=""></div><div>twisted.python.logfile was not fully ported as of Twisted 15.4; just the syntax.  So this error is expected.  However, you may be pleased to hear that the fix landed last week: <a href="https://twistedmatrix.com/trac/ticket/6749" class="">https://twistedmatrix.com/trac/ticket/6749</a> and will be in 15.5.</div><div><br class=""></div><div>-glyph</div><br class=""></body></html>