Page 1 of 2
[SOLVED] Can't load the plugin...
Posted: Wed Aug 27, 2014 4:22 am
by BackRaw
Hi,
I'm using Arch Linux as a server setup, and installation of the Release from July, 17th went fine. When I type into the console
plugin_print, it returns:
Code: Select all
---------------------
0: "Source Python, (C) 2012, Source Python Team."
---------------------
Though, the command
sp isn't registered somehow...
Any help?

Edit:
[GCC 4.9.1] I git pull'd the Source.Python directory, set RAM to 5GB and CPUs to 4. Now everything seems to be compiling as it should
Posted: Wed Aug 27, 2014 8:59 am
by Ayuto
Could you please post the whole start log?

Posted: Wed Aug 27, 2014 1:48 pm
by satoon101
My first thoughts are that you either don't have permissions set properly or did not upload the translation files. Though, as Ayuto stated, if you post the entire start log, the error should be shown in there.
Though, we probably need to add a try/except to loading the main __init__ file to make sure we don't finish loading the plugin if there is an error.
Posted: Wed Aug 27, 2014 2:31 pm
by Ayuto
Done!
https://github.com/Source-Python-Dev-Team/Source.Python/commit/fcba62b6fb4e1140fada3680222a5f174c0a7f60#diff-5c95036be6168ca9cab7c70abc7e066bL129In case of an error it will now look like this.
Code: Select all
[Source.Python] Loading...
Traceback (most recent call last):
File "C:\Server\css\cstrike\addons\source-python\packages\source-python\__init__.py", line 29, in <module>
a
NameError: name 'a' is not defined
[Source.Python] Failed to load.
[Source.Python] Could not initialize python.
Failed to load plugin "addons/source-python"
Posted: Fri Aug 29, 2014 11:58 pm
by BackRaw
Can I save the log to a file? don't know how this works with steamcmd
EDIT:
Code: Select all
Auto detecting CPU
Using default binary: ./srcds_linux
Server will auto-restart if there is a crash.
Using breakpad minidump system
Using breakpad crash handler
Console initialized.
Setting breakpad minidump AppID = 240
Forcing breakpad minidump interfaces to load
Looking up breakpad interfaces from steamclient
Calling BreakpadMiniDumpSystemInit
Loaded 1335 VPK file hashes from /home/cheeba/css/serverfiles/cstrike/cstrike_pak.vpk for pure server operation.
Loaded 1335 VPK file hashes from /home/cheeba/css/serverfiles/cstrike/cstrike_pak.vpk for pure server operation.
Loaded 1218 VPK file hashes from /home/cheeba/css/serverfiles/hl2/hl2_textures.vpk for pure server operation.
Loaded 574 VPK file hashes from /home/cheeba/css/serverfiles/hl2/hl2_sound_vo_english.vpk for pure server operation.
Loaded 383 VPK file hashes from /home/cheeba/css/serverfiles/hl2/hl2_sound_misc.vpk for pure server operation.
Loaded 434 VPK file hashes from /home/cheeba/css/serverfiles/hl2/hl2_misc.vpk for pure server operation.
Loaded 5 VPK file hashes from /home/cheeba/css/serverfiles/platform/platform_misc.vpk for pure server operation.
server_srv.so loaded for "Counter-Strike: Source"
[Source.Python] Loading...
Traceback (most recent call last):
File "/home/cheeba/css/serverfiles/cstrike/addons/source-python/packages/source-python/__init__.py", line 40, in <module>
from hooks.exceptions import ExceptHooks
File "/home/cheeba/css/serverfiles/cstrike/addons/source-python/packages/source-python/hooks/__init__.py", line 10, in <module>
from translations.strings import LangStrings
File "/home/cheeba/css/serverfiles/cstrike/addons/source-python/packages/source-python/translations/strings.py", line 8, in <module>
from binascii import unhexlify
ImportError: libz.so.1: cannot open shared object file: No such file or directory
[Source.Python] Loaded successfully.
maxplayers set to 16
Unknown command "r_decal_cullsize"
Network: IP 10.211.55.24, mode MP, dedicated Yes, ports 27015 SV / 27005 CL
ConVarRef room_type doesn't point to an existing ConVar
Executing dedicated server config file css-server.cfg
Using map cycle file 'cfg/mapcycle_default.txt'. ('cfg/mapcycle.txt' was not found.)
Set motd from file 'cfg/motd_default.txt'. ('cfg/motd.txt' was not found.)
Set motd_text from file 'cfg/motd_text_default.txt'. ('cfg/motd_text.txt' was not found.)
Initializing Steam libraries for secure Internet server
[S_API FAIL] SteamAPI_Init() failed; SteamAPI_IsSteamRunning() failed.
Looking up breakpad interfaces from steamclient
Calling BreakpadMiniDumpSystemInit
No account token specified; logging into anonymous game server account. (Use sv_setsteamaccount to login to a persistent account.)
Connection to Steam servers successful.
Public IP is -------------.
Assigned anonymous gameserver Steam ID [A-1:4263370753(4590)].
VAC secure mode is activated.
plugin_print
Loaded plugins:
---------------------
0: "Source Python, (C) 2012, Source Python Team."
---------------------
sp load
Unknown command "sp"
Thu Aug 28 18:38:29 CEST 2014: Server Quit
EDIT 2: I installed zlib, I'm getting a clean clone and compile it myself - I'll keep you up to date.
Posted: Sat Aug 30, 2014 12:56 am
by satoon101
Awesome!!!
BackRaw wrote:Can I save the log to a file?
We could change DevMsg to instead use IVEngineServer::LogPrint so that if you have logging enabled it will print to your log file. We should consider this for all messages that use DevMsg level 0 that are sent prior to the plugin being completely loaded.
Posted: Sat Aug 30, 2014 7:09 am
by Ayuto
You can also add "-condebug [<file>]" to the command line to write the whole console output to a file.
Posted: Sun Aug 31, 2014 11:21 am
by BackRaw
Posted: Tue Sep 02, 2014 7:12 pm
by stonedegg
Same happens to me. SP is loaded, but the sp command is not registered. So I can't load any plugins. help pls.
Posted: Tue Sep 02, 2014 7:49 pm
by Ayuto
@BackRaw
You either need more RAM to compile or need an older version of GCC. I have noticed that GCC 4.9 consumes a lot memory. Previously, I was using GCC 4.5 and was able to compile the code with 4 CPUs and 2GB RAM. Now, I compile with 3 CPUs and 4GB RAM.

@stonedegg
Have you tried to compile the latest revision on our repository? I guess you also suffer from the GLIBC issue. The latest revision should make this error visible.
Posted: Tue Sep 02, 2014 9:44 pm
by stonedegg
Yes, I'm getting this GLIBC error. I have downloaded the latest version, is it not the latest revision? I don't know how to compile it.
Posted: Wed Sep 03, 2014 6:46 am
by satoon101
I updated the wiki to include a Building on Windows tutorial, but haven't gotten around to creating the Building on Linux one. If any other authorized members wishes to do so, please do.
The latest uploaded version, according to the
Releases page, is currently 29 commits behind the current repo version. The fix implemented by Ayuto to fail loading the plugin if the import of the main __init__ fails is not in the current release.
I would like to get these glibc errors completely figured out and fixed prior to posting a new release version. However, it might be some time till we are able to get that fixed. I really have to agree with this particular quote from the thread about the glibc error:
Hedgehog wrote:I'm startng to hate GS...
Posted: Wed Sep 03, 2014 7:35 am
by BackRaw
@Satoon
thank you - take your time. you'll get that fixed

@Ayuto
I was trying to compile it on a virtual machine, I'll see how much RAM the machine has, it's probably lower than 2GB lol. I'll try with 5GB and 4 CPUs as soon as I'm home, that should be enough.
PS: Oh my God, I should've read the error better... it says what it needs lol.
Posted: Wed Sep 03, 2014 11:02 am
by stonedegg
Okay, but I'm wondering, why don't you upload the latest compiled version to the download section, instead of having one there that doesn't work at all?
Posted: Wed Sep 03, 2014 1:10 pm
by BackRaw
I don't have a game server lol. I use a virtual machine on top of my host machine @ home....

Posted: Wed Sep 03, 2014 1:10 pm
by L'In20Cible
It works fine on my machines - not our fault if your server providers are renting you fossilized game servers.

Posted: Wed Sep 03, 2014 2:10 pm
by satoon101
Yeah, the current version works on most machines. If we compile the newest version, it would still not work on your server.
Posted: Wed Sep 03, 2014 3:02 pm
by Hedgehog
stonedegg wrote:Yes, I'm getting this GLIBC error. I have downloaded the latest version, is it not the latest revision? I don't know how to compile it.
What kind of GLIBC error? I had problem with time.cpython-3.4 module so I had to recompile python. If you have the same one, I can give you the working one

About compilation: get some Linux distributive and install it in VirtualBox (its free) or any similar program. After installation just read
this post, its more simpler then you can think

BackRaw wrote:I was trying to compile it on a virtual machine, I'll see how much RAM the machine has, it's probably lower than 2GB lol. I'll try with 5GB and 4 CPUs as soon as I'm home, that should be enough.
PS: Oh my God, I should've read the error better... it says what it needs lol.
For me it was ok with 4Gb (don't know about 3GB) on Ubuntu 12.04 in VirtualBox

Big amount of CPU isn't very critical, it just increase a compilation speed.
stonedegg wrote:Okay, but I'm wondering, why don't you upload the latest compiled version to the download section, instead of having one there that doesn't work at all?
I was trying to run Source.Python on my server for almost 1 week and when I solve one problem another one immediately appears, so there are no guaranties that the new version will work on your hosting...
L'In20Cible wrote:It works fine on my machines - not our fault if your server providers are renting you fossilized game servers.
Yes, its better to have your own server in data center where you will have all your game servers, but I guess more than 3/4 servers of all games that Source.Python supports are hosted at some hosting provider. So I guess that a lot of people will thank you if such problems will be solved
Posted: Wed Sep 03, 2014 3:13 pm
by stonedegg
So, the sp command does not work because of this GLIBC Error?
This is the error I get:
Code: Select all
[Source.Python] Loading...
Traceback (most recent call last):
File "../css/cstrike/addons/source-python/packages/source-python/__init__.py", line 40, in <module>
from hooks.exceptions import ExceptHooks
File "../css/cstrike/addons/source-python/packages/source-python/hooks/__init__.py", line 8, in <module>
from loggers import _SPLogger
File "../css/cstrike/addons/source-python/packages/source-python/loggers.py", line 8, in <module>
from datetime import date
File "../css/cstrike/addons/source-python/Python3/datetime.py", line 7, in <module>
import time as _time
ImportError: /lib32/libc.so.6: version `GLIBC_2.17' not found (required by ../css/cstrike/addons/source-python/Python3/lib-dynload/time.cpython-34m.so)
[Source.Python] Loaded successfully.
Posted: Wed Sep 03, 2014 3:24 pm
by satoon101
The error causes Source.Python to not complete its loading process. If you look at the originating line that causes the error, you will see that almost none of the initialization process has been completed. The following might be slightly different in the current release, but the idea is the same:
Syntax: Select all
# =============================================================================
# >> IMPORTS
# =============================================================================
# Site-Package Imports
# Configobj
from configobj import ConfigObjError
# Source.Python Imports
# Cvars
from cvars import ConVar
# Hooks - These are imported to implement the exceptions and warnings hooks
from hooks.exceptions import except_hooks
from hooks.warnings import warning_hooks
The next to last line in that block is where the error originates. The "sp" command is not registered until much later in the process:
Syntax: Select all
# =============================================================================
# >> INITIALIZE SP COMMAND
# =============================================================================
from core.command import _core_command
If we were to upload a new release, the only difference it would make is that the plugin would fail to load if an error happens on initialization. So,
plugin_print would not show Source.Python as being loaded on the server.
If you notice, the error you have now posted is the exact same as the one in Hedgehog's thread:
http://www.sourcepython.com/showthread.php?581-Server-crash-on-SP-loading&p=2960&viewfull=1#post2960Again, we do intend to figure this issue out and get it fixed, but it will take some time.