Re: Traipse server linux console
And in fact, following on from that:
mplay_server.py calls orpg_log.py at line 64 (partial traceback)
Code:
File "/home/openrpg/Traipse/System/orpg/networking/mplay_server.py", line 64, in <module>
from orpg.tools.orpg_log import logger#, crash, debug
File "/home/openrpg/Traipse/System/orpg/tools/orpg_log.py", line 30, in <module>
import sys, os, os.path, time, traceback, inspect, wx
ImportError: No module named wx
So, if you comment it from mplay_server.py we get (partial traceback)
Code:
File "/home/openrpg/Traipse/System/orpg/networking/mplay_server.py", line 2591, in <module>
server = mplay_server()
File "/home/openrpg/Traipse/System/orpg/networking/mplay_server.py", line 223, in __init__
logger._set_log_level = 16
NameError: global name 'logger' is not defined
Which (I did wonder) means that we do actually require the logging facility to be available in order to run the server. The fundamental problem is logging (for some reason) hooks into wx.
In fact, the only way to make this work is to remove the wx call (and any functions requiring it) from orpg_log.py.
In my setup, I've therefore created a new file, orpg_log_nowx.py, removed the wx import and the Term2Win and DebugConsole classes.
Line 64 of mplay_server.py then becomes
from orpg.tools.orpg_log_nowx import logger#, crash, debug
I imagine some code could be written to check for wx and then import the required functions only. I might give this a bash over xmas, though I've never coded python before, so that will be interesting.
My advice would be to avoid including GUI based functions in the backend for the future, keeping such requirements clearly in the GUI front end code, so that the 'text only' server backend isn't complicated with such calls.