<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Sep 8, 2015 at 3:16 PM, Glyph <span dir="ltr"><<a href="mailto:glyph@twistedmatrix.com" target="_blank">glyph@twistedmatrix.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><span class=""><div><br></div><br><div><blockquote type="cite"><div>On Sep 7, 2015, at 11:48 PM, Gelin Yan <<a href="mailto:dynamicgl@gmail.com" target="_blank">dynamicgl@gmail.com</a>> wrote:</div><br><div><div dir="ltr">Hi All<div><br></div><div>    I just noticed my app raised an exception such as</div><div><br></div><div><p><span>Traceback (most recent call last):</span></p><p><span>  File "/home/m/py343/lib/python3.4/runpy.py", line 170, in _run_module_as_main</span></p><p><span>    "__main__", mod_spec)</span></p><p><span>  File "/home/m/py343/lib/python3.4/runpy.py", line 85, in _run_code</span></p><p><span>    exec(code, run_globals)</span></p><p><span>  File "gw_go.zip/__main__.py", line 8, in <module></span></p><p><span>  File "gw_go.zip/gw_server2/gw_go.py", line 87, in main</span></p><p><span>  File "/home/m/py343/lib/python3.4/site-packages/twisted/python/logfile.py", line 48, in fromFullPath</span></p><p><span>    os.path.dirname(logPath), *args, **kwargs)</span></p><p><span>  File "/home/m/py343/lib/python3.4/site-packages/twisted/python/logfile.py", line 40, in __init__</span></p><p><span>    self._openFile()</span></p><p><span>  File "/home/m/py343/lib/python3.4/site-packages/twisted/python/logfile.py", line 238, in _openFile</span></p><p><span>    BaseLogFile._openFile(self)</span></p><p><span>  File "/home/m/py343/lib/python3.4/site-packages/twisted/python/logfile.py", line 75, in _openFile</span></p><p><span>    self._file = file(self.path, "w+", 1)</span></p><p><span>NameError: name 'file' is not defined</span></p><p><span><br></span></p><p><span>     I used python 3.4 and twisted 15.40 (from pip) under ubuntu 14.04.</span></p></div></div></div></blockquote><br></div></span><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" target="_blank">https://twistedmatrix.com/trac/ticket/6749</a> and will be in 15.5.</div><span class="HOEnZb"><font color="#888888"><div><br></div><div>-glyph</div><br></font></span></div><br>_______________________________________________<br>
Twisted-Python mailing list<br>
<a href="mailto:Twisted-Python@twistedmatrix.com">Twisted-Python@twistedmatrix.com</a><br>
<a href="http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python" rel="noreferrer" target="_blank">http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python</a><br>
<br></blockquote></div><br></div><div class="gmail_extra">Hi Glyph</div><div class="gmail_extra"><br></div><div class="gmail_extra">    I just found out the ticket you mentioned. It looks like 15.4 doesn't include it. I am waiting for the next release. For now, I have to use the standard logging system.</div><div class="gmail_extra"><br></div><div class="gmail_extra">Regards</div><div class="gmail_extra"><br></div><div class="gmail_extra">gelin yan  </div></div>