RPGObjects.com
http://www.rpgobjects.com/forum/

Traipse server linux console
http://www.rpgobjects.com/forum/viewtopic.php?f=4&t=986
Page 2 of 2

Author:  prof.ebral [ Mon Dec 20, 2010 11:41 pm ]
Post subject:  Re: Traipse server linux console

Aha .. there it is. You should be able to remark that line and it will not require wx anymore. Just add an # in front of it.

I am not making anymore changes to the code. Sorry, but Ornery Orc is now closed and I don't want to work on it further. I will definitely help you with tech support though.

Author:  Tromador [ Tue Dec 21, 2010 3:30 pm ]
Post subject:  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.

Author:  prof.ebral [ Tue Dec 21, 2010 5:44 pm ]
Post subject:  Re: Traipse server linux console

Tromador wrote:
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.


I am. It's part of the basic structure of the next milestone. Sorry for the hassle. The next milestone is going to be more work by yours truly instead of what has been out there now, a lot of work by others and a few changes and fixes by me.

Page 2 of 2 All times are UTC
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/