This looks really good, however I'm struggling to make it run on LinuxMint 21.3 here four years on.
Using the same pyenv as works for the 1.5 console, which is a python 2.7 venv with twisted etc, I get a connect followed by disconnect straight away.
Code: Select all
Unhandled Error
Traceback (most recent call last):
File "/home/user/.pyenv/versions/2.7.18/envs/Oolite-Debug/lib/python2.7/site-packages/twisted/python/log.py", line 103, in callWithLogger
return callWithContext({"system": lp}, func, *args, **kw)
File "/home/user/.pyenv/versions/2.7.18/envs/Oolite-Debug/lib/python2.7/site-packages/twisted/python/log.py", line 86, in callWithContext
return context.call({ILogContext: newCtx}, func, *args, **kw)
File "/home/user/.pyenv/versions/2.7.18/envs/Oolite-Debug/lib/python2.7/site-packages/twisted/python/context.py", line 122, in callWithContext
return self.currentContext().callWithContext(ctx, func, *args, **kw)
File "/home/user/.pyenv/versions/2.7.18/envs/Oolite-Debug/lib/python2.7/site-packages/twisted/python/context.py", line 85, in callWithContext
return func(*args,**kw)
--- <exception caught here> ---
File "/home/user/.pyenv/versions/2.7.18/envs/Oolite-Debug/lib/python2.7/site-packages/twisted/internet/posixbase.py", line 614, in _doReadOrWrite
why = selectable.doRead()
File "/home/user/.pyenv/versions/2.7.18/envs/Oolite-Debug/lib/python2.7/site-packages/twisted/internet/tcp.py", line 243, in doRead
return self._dataReceived(data)
File "/home/user/.pyenv/versions/2.7.18/envs/Oolite-Debug/lib/python2.7/site-packages/twisted/internet/tcp.py", line 249, in _dataReceived
rval = self.protocol.dataReceived(data)
File "/home/user/Oolite-scripts/OoliteDebugConsole2/ooliteConsoleServer/PropertyListPacketProtocol.py", line 111, in dataReceived
self.__dispatchPacket()
File "/home/user/Oolite-scripts/OoliteDebugConsole2/ooliteConsoleServer/PropertyListPacketProtocol.py", line 154, in __dispatchPacket
self.plistPacketReceived(plist)
File "/home/user/Oolite-scripts/OoliteDebugConsole2/ooliteConsoleServer/OoliteDebugConsoleProtocol.py", line 127, in plistPacketReceived
self.__noteConfigurationPacket(packet)
File "/home/user/Oolite-scripts/OoliteDebugConsole2/ooliteConsoleServer/OoliteDebugConsoleProtocol.py", line 222, in __noteConfigurationPacket
self.delegate.loadConfig(self.__configuration)
File "DebugConsole.py", line 270, in loadConfig
app.initClientSettings(config)
File "DebugConsole.py", line 2829, in initClientSettings
self.setFontFace(value, plist=True, skipUpdate='font-size' in settingsKeys)
File "DebugConsole.py", line 2770, in setFontFace
self.updateFontBox(self.fontList.index(face))
exceptions.ValueError: 'Courier' is not in list
Using the more current system python (3.10) with python3-twisted installed via apt, things appear worse. The connection does not appear to happen at all. Stderr looks like this:
Code: Select all
/home/user/Oolite-scripts/OoliteDebugConsole2/DebugConsole.py:295: SyntaxWarning: "is not" with a literal. Did you mean "!="?
if app.top.state() is not 'zoomed' and app.top.state() is not 'normal':
/home/user/Oolite-scripts/OoliteDebugConsole2/DebugConsole.py:295: SyntaxWarning: "is not" with a literal. Did you mean "!="?
if app.top.state() is not 'zoomed' and app.top.state() is not 'normal':
--- Logging error ---
Traceback (most recent call last):
File "/home/user/Oolite-scripts/OoliteDebugConsole2/ooliteConsoleServer/OoliteDebugConsoleProtocol.py", line 164, in __requestConnectionPacket
self.sendPlistPacket(response)
File "/home/user/Oolite-scripts/OoliteDebugConsole2/ooliteConsoleServer/PropertyListPacketProtocol.py", line 139, in sendPlistPacket
self.transport.write(hdr)
File "/usr/lib/python3/dist-packages/twisted/internet/_newtls.py", line 179, in write
FileDescriptor.write(self, bytes)
File "/usr/lib/python3/dist-packages/twisted/internet/abstract.py", line 356, in write
_dataMustBeBytes(data)
File "/usr/lib/python3/dist-packages/twisted/internet/abstract.py", line 24, in _dataMustBeBytes
raise TypeError("Data must be bytes")
TypeError: Data must be bytes
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3.10/logging/__init__.py", line 1100, in emit
msg = self.format(record)
File "/usr/lib/python3.10/logging/__init__.py", line 943, in format
return fmt.format(record)
File "/usr/lib/python3.10/logging/__init__.py", line 678, in format
record.message = record.getMessage()
File "/usr/lib/python3.10/logging/__init__.py", line 368, in getMessage
msg = msg % self.args
TypeError: not all arguments converted during string formatting
Call stack:
File "/home/user/Oolite-scripts/OoliteDebugConsole2/DebugConsole.py", line 4318, in <module>
main()
File "/home/user/Oolite-scripts/OoliteDebugConsole2/DebugConsole.py", line 4305, in main
reactor.run()
File "/usr/lib/python3/dist-packages/twisted/internet/base.py", line 1315, in run
self.mainLoop()
File "/usr/lib/python3/dist-packages/twisted/internet/base.py", line 1328, in mainLoop
reactorBaseSelf.doIteration(t)
File "/usr/lib/python3/dist-packages/twisted/internet/epollreactor.py", line 244, in doPoll
log.callWithLogger(selectable, _drdw, selectable, fd, event)
File "/usr/lib/python3/dist-packages/twisted/python/log.py", line 96, in callWithLogger
return callWithContext({"system": lp}, func, *args, **kw)
File "/usr/lib/python3/dist-packages/twisted/python/log.py", line 80, in callWithContext
return context.call({ILogContext: newCtx}, func, *args, **kw)
File "/usr/lib/python3/dist-packages/twisted/python/context.py", line 117, in callWithContext
return self.currentContext().callWithContext(ctx, func, *args, **kw)
File "/usr/lib/python3/dist-packages/twisted/python/context.py", line 82, in callWithContext
return func(*args, **kw)
File "/usr/lib/python3/dist-packages/twisted/internet/posixbase.py", line 683, in _doReadOrWrite
why = selectable.doRead()
File "/usr/lib/python3/dist-packages/twisted/internet/tcp.py", line 247, in doRead
return self._dataReceived(data)
File "/usr/lib/python3/dist-packages/twisted/internet/tcp.py", line 252, in _dataReceived
rval = self.protocol.dataReceived(data)
File "/home/user/Oolite-scripts/OoliteDebugConsole2/ooliteConsoleServer/PropertyListPacketProtocol.py", line 111, in dataReceived
self.__dispatchPacket()
File "/home/user/Oolite-scripts/OoliteDebugConsole2/ooliteConsoleServer/PropertyListPacketProtocol.py", line 154, in __dispatchPacket
self.plistPacketReceived(plist)
File "/home/user/Oolite-scripts/OoliteDebugConsole2/ooliteConsoleServer/OoliteDebugConsoleProtocol.py", line 117, in plistPacketReceived
self.__requestConnectionPacket(packet)
File "/home/user/Oolite-scripts/OoliteDebugConsole2/ooliteConsoleServer/OoliteDebugConsoleProtocol.py", line 169, in __requestConnectionPacket
consoleLogger.exception("Exception in connection set-up: ", inst)
Message: 'Exception in connection set-up: '
Arguments: (TypeError('Data must be bytes'),)
--- Logging error ---
Traceback (most recent call last):
File "/home/user/Oolite-scripts/OoliteDebugConsole2/ooliteConsoleServer/OoliteDebugConsoleProtocol.py", line 164, in __requestConnectionPacket
self.sendPlistPacket(response)
File "/home/user/Oolite-scripts/OoliteDebugConsole2/ooliteConsoleServer/PropertyListPacketProtocol.py", line 139, in sendPlistPacket
self.transport.write(hdr)
File "/usr/lib/python3/dist-packages/twisted/internet/_newtls.py", line 179, in write
FileDescriptor.write(self, bytes)
File "/usr/lib/python3/dist-packages/twisted/internet/abstract.py", line 356, in write
_dataMustBeBytes(data)
File "/usr/lib/python3/dist-packages/twisted/internet/abstract.py", line 24, in _dataMustBeBytes
raise TypeError("Data must be bytes")
TypeError: Data must be bytes
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3.10/logging/__init__.py", line 1100, in emit
msg = self.format(record)
File "/usr/lib/python3.10/logging/__init__.py", line 943, in format
return fmt.format(record)
File "/usr/lib/python3.10/logging/__init__.py", line 678, in format
record.message = record.getMessage()
File "/usr/lib/python3.10/logging/__init__.py", line 368, in getMessage
msg = msg % self.args
TypeError: not all arguments converted during string formatting
Call stack:
File "/home/user/Oolite-scripts/OoliteDebugConsole2/DebugConsole.py", line 4318, in <module>
main()
File "/home/user/Oolite-scripts/OoliteDebugConsole2/DebugConsole.py", line 4305, in main
reactor.run()
File "/usr/lib/python3/dist-packages/twisted/internet/base.py", line 1315, in run
self.mainLoop()
File "/usr/lib/python3/dist-packages/twisted/internet/base.py", line 1328, in mainLoop
reactorBaseSelf.doIteration(t)
File "/usr/lib/python3/dist-packages/twisted/internet/epollreactor.py", line 244, in doPoll
log.callWithLogger(selectable, _drdw, selectable, fd, event)
File "/usr/lib/python3/dist-packages/twisted/python/log.py", line 96, in callWithLogger
return callWithContext({"system": lp}, func, *args, **kw)
File "/usr/lib/python3/dist-packages/twisted/python/log.py", line 80, in callWithContext
return context.call({ILogContext: newCtx}, func, *args, **kw)
File "/usr/lib/python3/dist-packages/twisted/python/context.py", line 117, in callWithContext
return self.currentContext().callWithContext(ctx, func, *args, **kw)
File "/usr/lib/python3/dist-packages/twisted/python/context.py", line 82, in callWithContext
return func(*args, **kw)
File "/usr/lib/python3/dist-packages/twisted/internet/posixbase.py", line 683, in _doReadOrWrite
why = selectable.doRead()
File "/usr/lib/python3/dist-packages/twisted/internet/tcp.py", line 247, in doRead
return self._dataReceived(data)
File "/usr/lib/python3/dist-packages/twisted/internet/tcp.py", line 252, in _dataReceived
rval = self.protocol.dataReceived(data)
File "/home/user/Oolite-scripts/OoliteDebugConsole2/ooliteConsoleServer/PropertyListPacketProtocol.py", line 111, in dataReceived
self.__dispatchPacket()
File "/home/user/Oolite-scripts/OoliteDebugConsole2/ooliteConsoleServer/PropertyListPacketProtocol.py", line 154, in __dispatchPacket
self.plistPacketReceived(plist)
File "/home/user/Oolite-scripts/OoliteDebugConsole2/ooliteConsoleServer/OoliteDebugConsoleProtocol.py", line 117, in plistPacketReceived
self.__requestConnectionPacket(packet)
File "/home/user/Oolite-scripts/OoliteDebugConsole2/ooliteConsoleServer/OoliteDebugConsoleProtocol.py", line 169, in __requestConnectionPacket
consoleLogger.exception("Exception in connection set-up: ", inst)
Message: 'Exception in connection set-up: '
Arguments: (TypeError('Data must be bytes'),)
DebugConsole.ODCProtocol: ERROR Failed to open connection.
Unhandled Error
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/twisted/python/log.py", line 96, in callWithLogger
return callWithContext({"system": lp}, func, *args, **kw)
File "/usr/lib/python3/dist-packages/twisted/python/log.py", line 80, in callWithContext
return context.call({ILogContext: newCtx}, func, *args, **kw)
File "/usr/lib/python3/dist-packages/twisted/python/context.py", line 117, in callWithContext
return self.currentContext().callWithContext(ctx, func, *args, **kw)
File "/usr/lib/python3/dist-packages/twisted/python/context.py", line 82, in callWithContext
return func(*args, **kw)
--- <exception caught here> ---
File "/usr/lib/python3/dist-packages/twisted/internet/posixbase.py", line 683, in _doReadOrWrite
why = selectable.doRead()
File "/usr/lib/python3/dist-packages/twisted/internet/tcp.py", line 247, in doRead
return self._dataReceived(data)
File "/usr/lib/python3/dist-packages/twisted/internet/tcp.py", line 252, in _dataReceived
rval = self.protocol.dataReceived(data)
File "/home/user/Oolite-scripts/OoliteDebugConsole2/ooliteConsoleServer/PropertyListPacketProtocol.py", line 111, in dataReceived
self.__dispatchPacket()
File "/home/user/Oolite-scripts/OoliteDebugConsole2/ooliteConsoleServer/PropertyListPacketProtocol.py", line 154, in __dispatchPacket
self.plistPacketReceived(plist)
File "/home/user/Oolite-scripts/OoliteDebugConsole2/ooliteConsoleServer/OoliteDebugConsoleProtocol.py", line 117, in plistPacketReceived
self.__requestConnectionPacket(packet)
File "/home/user/Oolite-scripts/OoliteDebugConsole2/ooliteConsoleServer/OoliteDebugConsoleProtocol.py", line 177, in __requestConnectionPacket
self.sendPlistPacket(response)
File "/home/user/Oolite-scripts/OoliteDebugConsole2/ooliteConsoleServer/PropertyListPacketProtocol.py", line 139, in sendPlistPacket
self.transport.write(hdr)
File "/usr/lib/python3/dist-packages/twisted/internet/_newtls.py", line 179, in write
FileDescriptor.write(self, bytes)
File "/usr/lib/python3/dist-packages/twisted/internet/abstract.py", line 356, in write
_dataMustBeBytes(data)
File "/usr/lib/python3/dist-packages/twisted/internet/abstract.py", line 24, in _dataMustBeBytes
raise TypeError("Data must be bytes")
builtins.TypeError: Data must be bytes
If there's anything further I can do to help debug this, let me know.