[Twisted-Python] error on log module (twisted python 3)

Gelin Yan dynamicgl at gmail.com
Tue Sep 8 00:48:52 MDT 2015


Hi All

    I just noticed my app raised an exception such as

Traceback (most recent call last):

  File "/home/m/py343/lib/python3.4/runpy.py", line 170, in
_run_module_as_main

    "__main__", mod_spec)

  File "/home/m/py343/lib/python3.4/runpy.py", line 85, in _run_code

    exec(code, run_globals)

  File "gw_go.zip/__main__.py", line 8, in <module>

  File "gw_go.zip/gw_server2/gw_go.py", line 87, in main

  File
"/home/m/py343/lib/python3.4/site-packages/twisted/python/logfile.py", line
48, in fromFullPath

    os.path.dirname(logPath), *args, **kwargs)

  File
"/home/m/py343/lib/python3.4/site-packages/twisted/python/logfile.py", line
40, in __init__

    self._openFile()

  File
"/home/m/py343/lib/python3.4/site-packages/twisted/python/logfile.py", line
238, in _openFile

    BaseLogFile._openFile(self)

  File
"/home/m/py343/lib/python3.4/site-packages/twisted/python/logfile.py", line
75, in _openFile

    self._file = file(self.path, "w+", 1)

NameError: name 'file' is not defined


     I used python 3.4 and twisted 15.40 (from pip) under ubuntu 14.04.


Regards


gelin yan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://twistedmatrix.com/pipermail/twisted-python/attachments/20150908/a4194e95/attachment.html>


More information about the Twisted-Python mailing list