Server Help

ASSS Questions - wierd thing in asss dos prompt

hellzlaker - Tue Nov 14, 2006 2:35 pm
Post subject: wierd thing in asss dos prompt
this is what shows up in asss dos, idk what it means but the zone runs fine

Bak - Tue Nov 14, 2006 4:21 pm
Post subject:
sounds like a python problem.

do you have python installed?
Smong - Tue Nov 14, 2006 4:55 pm
Post subject:
On windows I have python 2.5 installed and get those errors too, I just ignore them.
BDwinsAlt - Tue Nov 14, 2006 4:58 pm
Post subject:
Windows is the key term there. With linux I have never gotten anything like that. ASSS works like a charm on SuSe Linux.
hellzlaker - Tue Nov 14, 2006 6:51 pm
Post subject:
no i dont have python installed, can you post a link anywayz? and if it still wont work - il just ignore it
BDwinsAlt - Wed Nov 15, 2006 8:07 am
Post subject:
try http://python.org

I would think you would need python for some things anyways.
Some of the flag modules use python.
Anonymous - Fri Feb 16, 2007 3:22 pm
Post subject:
i'm having the same problem even after installing python.. anything else we can do? would this effect the zone displaying the score of powerball games?
Anonymous - Fri Feb 16, 2007 4:34 pm
Post subject:
also cpickle isn't loading.
Bak - Fri Feb 16, 2007 5:49 pm
Post subject:
get the newest version of python and cpickle should load
Anonymous - Fri Feb 16, 2007 6:33 pm
Post subject:
so python for xp?? instead of just python 2.5....?
BDwinsAlt - Fri Feb 16, 2007 7:07 pm
Post subject:
32 Bit: http://www.python.org/ftp/python/2.5/python-2.5.msi
64 Bit: http://www.python.org/ftp/python/2.5/python-2.5.amd64.msi

Download it.
Hakaku - Wed Mar 28, 2007 8:19 am
Post subject:
I appoligize for bumping this topic, but I have the same problem:
Code: Show/Hide
I <cmod> loading C module 'pymod' from 'pymod'
'import site' failed; use -v for traceback
Traceback (most recent call last):
  File "<string>", line 1, in ?
ImportError: No module named os
Traceback (most recent call last):
  File "<string>", line 1, in ?
ImportError: No module named os
Traceback (most recent call last):
  File "<string>", line 1, in ?
ImportError: No module named os
Traceback (most recent call last):
  File "<string>", line 1, in ?
ImportError: No module named os
ImportError: No module named copy_reg
I <cmod> loading C module 'messages' from 'internal'
I <cmod> loading C module 'objects' from 'internal'
D <net> listening on 0.0.0.0:5000 (0)
E <pymod> can't import cPickle
D <main> entering main loop
D <mapnewsdl> news file 'news.txt' reread

I do have Python 2.5 installed, but I still get these error messages. I would like to be able to use python modules, but by uncommenting "pymod:pymod", I'll get this.

I'm running Windows XP, just a heads up. Can anyone help?
Smong - Wed Mar 28, 2007 8:26 am
Post subject:
Heh I was just looking into this myself. I was tying to import re (to get regex support) but it wasn't having it. Something to do with the module search path. The docs say create a file with any name but with ".pth" extension, on each line place a directory that should get added to the path. I put one of these files in asss/bin and it didn't work (bin is on the path, see test module below).

Here's my testing module, seems to work. Obviously I want to set the path before asss loads so I don't have to put this code into my modules.
Code: Show/Hide
import sys
print sys.path

sys.path.append("C:\\Python25\\Lib")
print sys.path

import re

Smong - Wed Mar 28, 2007 9:18 am
Post subject:
Ok simple fix, open asss.bat, add this line before "GOTO START":
SET PYTHONPATH=C:\Python25\Lib

Edit the actual path to where python is on your computer.
Hakaku - Wed Mar 28, 2007 9:43 am
Post subject:
No dice :/
I put exactly that, which is also my file path, and it didn't change a thing.
Smong - Wed Mar 28, 2007 10:32 am
Post subject:
Copy this into test.py:
Code: Show/Hide
import sys
print sys.path

Then add it to modules.conf and see what it is printing.
Hakaku - Wed Mar 28, 2007 11:05 am
Post subject:
Alright, so I created test.py adding those 2 lines, put it in the bin directory, and after put "<py> test" in the modules section. I hope that's what I'm suppose to do, anyhow, here's what asss prints:

Code: Show/Hide
I <cmod> loading C module 'pymod' from 'pymod'
'import site' failed; use -v for traceback
Traceback (most recent call last):
  File "<string>", line 1, in ?
ImportError: No module named os
Traceback (most recent call last):
  File "<string>", line 1, in ?
ImportError: No module named os
Traceback (most recent call last):
  File "<string>", line 1, in ?
ImportError: No module named os
Traceback (most recent call last):
  File "<string>", line 1, in ?
ImportError: No module named os
ImportError: No module named copy_reg
I <pymod> loading python module 'test'
['C:\\Program Files\\asss-1.4.3\\bin\\python24.zip', '.\\DLLs', '.\\
lib', '.\\lib\\plat-win', '.\\lib\\lib-tk', 'C:\\Program Files\\asss
-1.4.3\\bin']
I <cmod> loading C module 'messages' from 'internal'
I <cmod> loading C module 'objects' from 'internal'
D <net> listening on 0.0.0.0:5000 (0)
E <pymod> can't import cPickle
D <main> entering main loop
D <mapnewsdl> news file 'news.txt' reread

Smong - Wed Mar 28, 2007 11:43 am
Post subject:
Looks like it isn't picking up the PYTHONPATH variable.

Only other thing I can think of is I have C:\Python25 appended to my PATH. You can edit your path by pressing windows key + pause, then click the advanced tab, then the environment variables button, you probably need to be administrator and you may need to restart after editing that.
Hakaku - Wed Mar 28, 2007 12:07 pm
Post subject:
Am I suppose to just add " ;C:\Python25 " under System Variables, Path --> edit, after the text already there?

If that's correct, I just finished trying that + restart computer... icon_confused.gif It didn't change a thing.

EDIT: I just realize I've been putting "SET PYTHONPATH=C:\Python25\Lib" before the wrong "GOTO start"... It never occured to me it's written 3 times in the batch file O_o

Anyway, thanks for all your help Smong!
numpf - Wed Mar 28, 2007 2:30 pm
Post subject:
This should be a simple python version mismatch. Smong probably isn't getting the errors because he probably compiled his version of the server from source. The asss binaries for windows are linked against python 2.4.1, so you need to have python 2.4.x (probably doesn't have to be 2.4.1, but if it doesn't work with others, try it) installed if you want site packages like cPickle to work. You should probably not try to get python 2.4 to use 2.5 site packages, which is what is implied by smong's suggestion.

Let me know if that fixes it for you.

If you want to use python 2.5 you need to follow the windows build instructions, and replace some instances of 2.4 and 24 in the build system. It is hard coded in a couple places that I now forget. This will eventually be fixed. I suggest not trying this unless you know why you _need_ 2.5

-numpf
Smong - Wed Mar 28, 2007 4:20 pm
Post subject:
I didn't compile win asss from source. Yes using 2.5 packages with 2.4 probably isn't a good idea (win asss comes with a python24.dll). Seems to work for my purposes (which is testing, I do serious dev on linux and have no issues there).

@Hakaku
Yes I appended ;C:\Python2 to my path, I think I may have done that at one point to make python accessable from my favourite text editor. Did you get it to work in the end? Your edit doesn't say.
Hakaku - Wed Mar 28, 2007 10:00 pm
Post subject:
Well, yes and no. ASSS shows this, it'll say 'loading module', but the module(s) will never load (at least afaik). How do I see if they're working? Here's using the "test" module:
Code: Show/Hide

I <cmod> loading C module 'enc_cont' from 'security'
I <cmod> loading C module 'pymod' from 'pymod'
'import site' failed; use -v for traceback
I <pymod> loading python module 'test'
I <cmod> loading C module 'messages' from 'internal'
I <cmod> loading C module 'objects' from 'internal'
D <net> listening on 0.0.0.0:5000 (0)
D <main> entering main loop
D <mapnewsdl> news file 'news.txt' reread


EDIT: Ignore me, I just hadn't set the commands in the 'groupdef.dir', it works now.
All times are -5 GMT
View topic
Powered by phpBB 2.0 .0.11 © 2001 phpBB Group