SourcePython conflicts with Sourcemod plugins

All other Source.Python topics and issues.
Tetragromaton
Junior Member
Posts: 20
Joined: Tue Mar 03, 2020 6:39 am

SourcePython conflicts with Sourcemod plugins

Postby Tetragromaton » Tue Mar 03, 2020 7:17 am

Ok so, i've installed SourcePython and then i've noticed that my sourcemod plugins started making unexpected things and stops working in some cases.
So are SourcePython incompatible with Sourcemod ?

Code: Select all

L 03/03/2020 - 10:11:43: [SM] Exception reported: Entity Outputs are disabled - See error logs for details
L 03/03/2020 - 10:13:59: [SDKTOOLS] Invalid detour address passed - Disabling detour to prevent crashes
Failed Sourcemod MySQL driver, unable to setup connection to any databases.
User avatar
L'In20Cible
Project Leader
Posts: 1534
Joined: Sat Jul 14, 2012 9:29 pm
Location: Québec

Re: SourcePython conflicts with Sourcemod plugins

Postby L'In20Cible » Tue Mar 03, 2020 8:05 am

Tetragromaton wrote:Ok so, i've installed SourcePython and then i've noticed that my sourcemod plugins started making unexpected things and stops working in some cases.
So are SourcePython incompatible with Sourcemod ?

Code: Select all

L 03/03/2020 - 10:11:43: [SM] Exception reported: Entity Outputs are disabled - See error logs for details
L 03/03/2020 - 10:13:59: [SDKTOOLS] Invalid detour address passed - Disabling detour to prevent crashes
Failed Sourcemod MySQL driver, unable to setup connection to any databases.

https://github.com/Source-Python-Dev-Te ... issues/306
Tetragromaton
Junior Member
Posts: 20
Joined: Tue Mar 03, 2020 6:39 am

Re: SourcePython conflicts with Sourcemod plugins

Postby Tetragromaton » Tue Mar 03, 2020 8:17 am

Thanks but i have no autoexec.cfg configs on the server. Attempt to do plugin_load addons/source-python after all plugins loaded on sourcemod side, results that sourcepython throws the following exception

Code: Select all

[Source.Python] Failed to load the main module due to following exception:
Traceback (most recent call last):

  File "/home/gameserver11968/serverfiles/csgo/addons/source-python/packages/source-python/__init__.py", line 91, in load
    setup_data()

  File "/home/gameserver11968/serverfiles/csgo/addons/source-python/packages/source-python/__init__.py", line 162, in setup_data
    _fire_output = entities._BaseEntityOutput.fire_output

  File "/home/gameserver11968/serverfiles/csgo/addons/source-python/packages/source-python/memory/manager.py", line 659, in __get__
    return_type

TypeError: 'Convention' object is not callable
[Source.Python] Could not initialize python.
Failed to load plugin "addons/source-python"
[Source.Python] Unloading...
#[Source.Python] Unloaded successfully.
#Unable to load plugin "addons/source-python
Tetragromaton
Junior Member
Posts: 20
Joined: Tue Mar 03, 2020 6:39 am

Re: SourcePython conflicts with Sourcemod plugins

Postby Tetragromaton » Tue Mar 03, 2020 8:23 am

Tried to put this into server.cfg file, it results the same error above.
User avatar
L'In20Cible
Project Leader
Posts: 1534
Joined: Sat Jul 14, 2012 9:29 pm
Location: Québec

Re: SourcePython conflicts with Sourcemod plugins

Postby L'In20Cible » Tue Mar 03, 2020 9:00 am

Please post the output of sp info. As for autoexec.cfg, you can create it and it will be executed once when the server starts. The fact you are able to load Source.Python through the server.cfg seems weird to me, as I'm pretty sure VALVe disabled loading plugins when a map is running a long time ago.
Tetragromaton
Junior Member
Posts: 20
Joined: Tue Mar 03, 2020 6:39 am

Re: SourcePython conflicts with Sourcemod plugins

Postby Tetragromaton » Tue Mar 03, 2020 9:06 am

Created autoexec.cfg, on load in console i see this weird thing

Code: Select all

[SP] Encountered a Warning:
  File '..sys', line 1: RuntimeWarning
    to-Python converter for EventVarType already registered; second conversion
        method ignored.


[SP] Encountered a Warning:
  File '..sys', line 1: RuntimeWarning
    to-Python converter for MapLoadType_t already registered; second conversion
        method ignored.


[SP] Encountered a Warning:
  File '..sys', line 1: RuntimeWarning
    to-Python converter for CGlobalVarsBase already registered; second conversion
        method ignored.


[SP] Encountered a Warning:
  File '..sys', line 1: RuntimeWarning
    to-Python converter for CGlobalVars already registered; second conversion method
        ignored.


[SP] Encountered a Warning:
  File '..sys', line 1: RuntimeWarning
    to-Python converter for boost::shared_ptr<KeyValues> already registered; second
        conversion method ignored.


[SP] Encountered a Warning:
  File '..sys', line 1: RuntimeWarning
    to-Python converter for KeyValues::types_t already registered; second conversion
        method ignored.


[SP] Encountered a Warning:
  File '..sys', line 1: RuntimeWarning
    to-Python converter for KeyValuesIter already registered; second conversion
        method ignored.


[SP] Encountered a Warning:
  File '..sys', line 1: RuntimeWarning
    to-Python converter for Vector already registered; second conversion method
        ignored.


[SP] Encountered a Warning:
  File '..sys', line 1: RuntimeWarning
    to-Python converter for QAngle already registered; second conversion method
        ignored.


[SP] Encountered a Warning:
  File '..sys', line 1: RuntimeWarning
    to-Python converter for Quaternion already registered; second conversion method
        ignored.


[SP] Encountered a Warning:
  File '..sys', line 1: RuntimeWarning
    to-Python converter for cplane_t already registered; second conversion method
        ignored.


[SP] Encountered a Warning:
  File '..sys', line 1: RuntimeWarning
    to-Python converter for RadianEuler already registered; second conversion method
        ignored.


[SP] Encountered a Warning:
  File '..sys', line 1: RuntimeWarning
    to-Python converter for matrix3x4_t already registered; second conversion method
        ignored.


[SP] Encountered a Warning:
  File '..sys', line 1: RuntimeWarning
    to-Python converter for Matrix3x4Row already registered; second conversion
        method ignored.


[SP] Encountered a Warning:
  File '..sys', line 1: RuntimeWarning
    to-Python converter for DIALOG_TYPE already registered; second conversion method
        ignored.


[SP] Encountered a Warning:
  File '..sys', line 1: RuntimeWarning
    to-Python converter for CUserMessage already registered; second conversion
        method ignored.


[SP] Encountered a Warning:
  File '..sys', line 1: RuntimeWarning
    to-Python converter for boost::shared_ptr<google::protobuf::Message> already
        registered; second conversion method ignored.


[SP] Encountered a Warning:
  File '..sys', line 1: RuntimeWarning
    to-Python converter for ShakeCommand_t already registered; second conversion
        method ignored.


[SP] Encountered a Warning:
  File '..sys', line 1: RuntimeWarning
    to-Python converter for
        export_hud_destination(boost::python::scope)::HudDestination already
        registered; second conversion method ignored.


[SP] Encountered a Warning:
  File '..sys', line 1: RuntimeWarning
    to-Python converter for export_fade_flags(boost::python::scope)::FadeFlags
        already registered; second conversion method ignored.


[SP] Encountered a Warning:
  File '..sys', line 1: RuntimeWarning
    to-Python converter for INetChannelHandler* already registered; second
        conversion method ignored.


[SP] Encountered a Warning:
  File '..sys', line 1: RuntimeWarning
    to-Python converter for INetChannel* already registered; second conversion
        method ignored.


[SP] Encountered a Warning:
  File '..sys', line 1: RuntimeWarning
    to-Python converter for INetChannelInfo* already registered; second conversion
        method ignored.


[SP] Encountered a Warning:
  File '..sys', line 1: RuntimeWarning
    to-Python converter for INetMessage* already registered; second conversion
        method ignored.


[SP] Encountered a Warning:
  File '..sys', line 1: RuntimeWarning
    to-Python converter for CBotCmd already registered; second conversion method
        ignored.


[SP] Encountered a Warning:
  File '..sys', line 1: RuntimeWarning
    to-Python converter for PLAYER_ANIM already registered; second conversion method
        ignored.


[SP] Encountered a Warning:
  File '..sys', line 1: RuntimeWarning
    to-Python converter for CPlayerGenerator already registered; second conversion
        method ignored.


[SP] Encountered a Warning:
  File '..sys', line 1: RuntimeWarning
    to-Python converter for IClient* already registered; second conversion method
        ignored.


[SP] Encountered a Warning:
  File '..sys', line 1: RuntimeWarning
    to-Python converter for CUserCmd already registered; second conversion method
        ignored.


[SP] Encountered a Warning:
  File '..sys', line 1: RuntimeWarning
    to-Python converter for CUserCmd* already registered; second conversion method
        ignored.


[SP] Encountered a Warning:
  File '..sys', line 1: RuntimeWarning
    to-Python converter for IVoiceServer* already registered; second conversion
        method ignored.


[SP] Encountered a Warning:
  File '..sys', line 1: RuntimeWarning
    to-Python converter for CPluginIter already registered; second conversion method
        ignored.


[SP] Encountered a Warning:
  File '..sys', line 1: RuntimeWarning
    to-Python converter for IRecipientFilter* already registered; second conversion
        method ignored.


[SP] Encountered a Warning:
  File '..sys', line 1: RuntimeWarning
    to-Python converter for boost::shared_ptr<MRecipientFilter> already registered;
        second conversion method ignored.


[SP] Encountered a Warning:
  File '..sys', line 1: RuntimeWarning
    to-Python converter for FileSystemSeek_t already registered; second conversion
        method ignored.


[SP] Encountered a Warning:
  File '..sys', line 1: RuntimeWarning
    to-Python converter for SourceFile already registered; second conversion method
        ignored.


[SP] Encountered a Warning:
  File '..sys', line 1: RuntimeWarning
    to-Python converter for CSteamID already registered; second conversion method
        ignored.


[SP] Encountered a Warning:
  File '..sys', line 1: RuntimeWarning
    to-Python converter for CSteamID* already registered; second conversion method
        ignored.


[SP] Encountered a Warning:
  File '..sys', line 1: RuntimeWarning
    to-Python converter for EUniverse already registered; second conversion method
        ignored.


[SP] Encountered a Warning:
  File '..sys', line 1: RuntimeWarning
    to-Python converter for EAccountType already registered; second conversion
        method ignored.


[SP] Encountered a Warning:
  File '..sys', line 1: RuntimeWarning
    to-Python converter for boost::shared_ptr<studiohdr_t> already registered;
        second conversion method ignored.


[SP] Encountered a Warning:
  File '..sys', line 1: RuntimeWarning
    to-Python converter for mstudiobone_t* already registered; second conversion
        method ignored.


[SP] Encountered a Warning:
  File '..sys', line 1: RuntimeWarning
    to-Python converter for mstudiobonecontroller_t already registered; second
        conversion method ignored.


[SP] Encountered a Warning:
  File '..sys', line 1: RuntimeWarning
    to-Python converter for mstudiobonecontroller_t* already registered; second
        conversion method ignored.


[SP] Encountered a Warning:
  File '..sys', line 1: RuntimeWarning
    to-Python converter for mstudiohitboxset_t already registered; second conversion
        method ignored.


[SP] Encountered a Warning:
  File '..sys', line 1: RuntimeWarning
    to-Python converter for mstudiohitboxset_t* already registered; second
        conversion method ignored.


[SP] Encountered a Warning:
  File '..sys', line 1: RuntimeWarning
    to-Python converter for mstudiobbox_t* already registered; second conversion
        method ignored.


[SP] Encountered a Warning:
  File '..sys', line 1: RuntimeWarning
    to-Python converter for mstudioanimdesc_t* already registered; second conversion
        method ignored.


[SP] Encountered a Warning:
  File '..sys', line 1: RuntimeWarning
    to-Python converter for mstudiomovement_t* already registered; second conversion
        method ignored.


[SP] Encountered a Warning:
  File '..sys', line 1: RuntimeWarning
    to-Python converter for mstudiolocalhierarchy_t* already registered; second
        conversion method ignored.


[SP] Encountered a Warning:
  File '..sys', line 1: RuntimeWarning
    to-Python converter for mstudioanimsections_t* already registered; second
        conversion method ignored.


[SP] Encountered a Warning:
  File '..sys', line 1: RuntimeWarning
    to-Python converter for mstudioseqdesc_t* already registered; second conversion
        method ignored.


[SP] Encountered a Warning:
  File '..sys', line 1: RuntimeWarning
    to-Python converter for mstudioevent_t* already registered; second conversion
        method ignored.


[SP] Encountered a Warning:
  File '..sys', line 1: RuntimeWarning
    to-Python converter for mstudioattachment_t* already registered; second
        conversion method ignored.


[SP] Encountered a Warning:
  File '..sys', line 1: RuntimeWarning
    to-Python converter for modtype_t already registered; second conversion method
        ignored.


[SP] Encountered a Warning:
  File '..sys', line 1: RuntimeWarning
    to-Python converter for IMDLCache* already registered; second conversion method
        ignored.


[SP] Encountered a Warning:
  File '..sys', line 1: RuntimeWarning
    to-Python converter for MDLCacheDataType_t already registered; second conversion
        method ignored.


[SP] Encountered a Warning:
  File '..sys', line 1: RuntimeWarning
    to-Python converter for WeaponSound_t already registered; second conversion
        method ignored.


[SP] Encountered a Warning:
  File '..sys', line 1: RuntimeWarning
    to-Python converter for WeaponProficiency_t already registered; second
        conversion method ignored.

[Source.Python] Failed to load the main module due to following exception:
Traceback (most recent call last):

  File "/home/gameserver11968/serverfiles/csgo/addons/source-python/packages/source-python/__init__.py", line 91, in load
    setup_data()

  File "/home/gameserver11968/serverfiles/csgo/addons/source-python/packages/source-python/__init__.py", line 162, in setup_data
    _fire_output = entities._BaseEntityOutput.fire_output

  File "/home/gameserver11968/serverfiles/csgo/addons/source-python/packages/source-python/memory/manager.py", line 659, in __get__
    return_type

TypeError: 'Convention' object is not callable
[Source.Python] Could not initialize python.
Failed to load plugin "addons/source-python"
[Source.Python] Unloading...
[Source.Python] Unloaded successfully.
User avatar
L'In20Cible
Project Leader
Posts: 1534
Joined: Sat Jul 14, 2012 9:29 pm
Location: Québec

Re: SourcePython conflicts with Sourcemod plugins

Postby L'In20Cible » Tue Mar 03, 2020 9:11 am

This happens because Source.Python is being loaded more than once. Make sure to remove the vdf file, and only have the load command once into autoexec.cfg and not anywhere else.
User avatar
L'In20Cible
Project Leader
Posts: 1534
Joined: Sat Jul 14, 2012 9:29 pm
Location: Québec

Re: SourcePython conflicts with Sourcemod plugins

Postby L'In20Cible » Tue Mar 03, 2020 9:14 am

Just realized that asking for sp info was pretty dumb of me, since you are unable to get it loaded. Based on your other post mentioning CS:GO, I've updated my local server and tested the latest build available here and it loaded fine. Please make sure to use that version, without any modifications to the data files.
Tetragromaton
Junior Member
Posts: 20
Joined: Tue Mar 03, 2020 6:39 am

Re: SourcePython conflicts with Sourcemod plugins

Postby Tetragromaton » Tue Mar 03, 2020 9:17 am

Even without .vdf file, and having only string that loads sourcepython in autoexec.cfg, it loads yes, but still conflicting with the same error.

Code: Select all

[SM] Exception reported: Entity Outputs are disabled - See error logs for details
Tetragromaton
Junior Member
Posts: 20
Joined: Tue Mar 03, 2020 6:39 am

Re: SourcePython conflicts with Sourcemod plugins

Postby Tetragromaton » Tue Mar 03, 2020 9:21 am

Yes i use latest build for csgo
User avatar
L'In20Cible
Project Leader
Posts: 1534
Joined: Sat Jul 14, 2012 9:29 pm
Location: Québec

Re: SourcePython conflicts with Sourcemod plugins

Postby L'In20Cible » Tue Mar 03, 2020 9:27 am

Tetragromaton wrote:Even without .vdf file, and having only string that loads sourcepython in autoexec.cfg, it loads yes, but still conflicting with the same error.

Code: Select all

[SM] Exception reported: Entity Outputs are disabled - See error logs for details

Put your sm load into autoexec.cfg as well, prior to loading SP. Either way, remove the following lines: https://github.com/Source-Python-Dev-Te ... #L161-L180 which would allow it to load, and then post the output of SP info.
Tetragromaton
Junior Member
Posts: 20
Joined: Tue Mar 03, 2020 6:39 am

Re: SourcePython conflicts with Sourcemod plugins

Postby Tetragromaton » Tue Mar 03, 2020 9:41 am

In console Unknown command "sm", and then sourcepython loading, i guess even removing that lines will not resolve problem of MySQL compatibility in future.
Tetragromaton
Junior Member
Posts: 20
Joined: Tue Mar 03, 2020 6:39 am

Re: SourcePython conflicts with Sourcemod plugins

Postby Tetragromaton » Tue Mar 03, 2020 9:44 am

Code: Select all

Unknown command "sm"
[Source.Python] Loading...
[Source.Python] Loaded successfully.
Loaded plugin "addons/source-python"
Setting mapgroup to 'mg_active'
Usage: host_workshop_collection <fileid>
Usage: workshop_start_map <fileid>
NET_CloseAllSockets
---- Host_NewGame ----
User avatar
L'In20Cible
Project Leader
Posts: 1534
Joined: Sat Jul 14, 2012 9:29 pm
Location: Québec

Re: SourcePython conflicts with Sourcemod plugins

Postby L'In20Cible » Tue Mar 03, 2020 9:47 am

After Source.Python is loaded, type sp info which will generate information about your installation and configuration.
Tetragromaton
Junior Member
Posts: 20
Joined: Tue Mar 03, 2020 6:39 am

Re: SourcePython conflicts with Sourcemod plugins

Postby Tetragromaton » Tue Mar 03, 2020 9:49 am

Code: Select all

Unknown command "sm"
[Source.Python] Loading...
[Source.Python] Loaded successfully.
Loaded plugin "addons/source-python"

IMPORTANT: Please copy the full output.
--------------------------------------------------------
Checksum      : f75d06317fa76ac5eee52dbd4aafc42e
Date          : 2020-03-03 09:49:20.181757
OS            : Linux-4.15.0-88-generic-x86_64-with-debian-buster-sid
Game          : csgo
SP version    : 695
Github commit : 92b3adfaaaf1bb9ecd2be1ddad55bc68589b4152
Server plugins:
   00: Metamod:Source 1.10.7-dev
   01: Source.Python, (C) 2012-2019, Source.Python Team.
SP plugins:
--------------------------------------------------------
Tetragromaton
Junior Member
Posts: 20
Joined: Tue Mar 03, 2020 6:39 am

Re: SourcePython conflicts with Sourcemod plugins

Postby Tetragromaton » Tue Mar 03, 2020 9:53 am

Yes, it seems to be working fine now by removing that lines from code.
User avatar
L'In20Cible
Project Leader
Posts: 1534
Joined: Sat Jul 14, 2012 9:29 pm
Location: Québec

Re: SourcePython conflicts with Sourcemod plugins

Postby L'In20Cible » Tue Mar 03, 2020 10:40 am

Tetragromaton wrote:

Code: Select all

Unknown command "sm"
[Source.Python] Loading...
[Source.Python] Loaded successfully.
Loaded plugin "addons/source-python"

IMPORTANT: Please copy the full output.
--------------------------------------------------------
Checksum      : f75d06317fa76ac5eee52dbd4aafc42e
Date          : 2020-03-03 09:49:20.181757
OS            : Linux-4.15.0-88-generic-x86_64-with-debian-buster-sid
Game          : csgo
SP version    : 695
Github commit : 92b3adfaaaf1bb9ecd2be1ddad55bc68589b4152
Server plugins:
   00: Metamod:Source 1.10.7-dev
   01: Source.Python, (C) 2012-2019, Source.Python Team.
SP plugins:
--------------------------------------------------------

Thanks. I was able to reproduce that exact error by loading Source.Python twice. The internal error spitted by Boost is the following:

Code: Select all

TypeError: No registered converter was able to produce a C++ rvalue of type enum Convention_t from this Python object of type Convention


Which happens on the second load, because the Python wrapper is bound to the first typeinfo so it can't be cast as the second. Which means that either you have both; the source-python.vdf and a plugin_load addons/source-python command or you have the command twice. Then, since the second load failed, it finalizes the shared Python interpreter causing the first to behave undefinedly. Make sure you only load it once and you shouldn't have to remove these lines.
User avatar
satoon101
Project Leader
Posts: 2698
Joined: Sat Jul 07, 2012 1:59 am

Re: SourcePython conflicts with Sourcemod plugins

Postby satoon101 » Tue Mar 03, 2020 12:24 pm

My guess is that you still have it in your server.cfg. Make sure to remove it from there so it only loads via the autoexec.cfg.
Image
Tetragromaton
Junior Member
Posts: 20
Joined: Tue Mar 03, 2020 6:39 am

Re: SourcePython conflicts with Sourcemod plugins

Postby Tetragromaton » Tue Mar 03, 2020 2:21 pm

No i had no plugin_load in server.cfg file, btw it resolved for now.

Return to “General Discussion”

Who is online

Users browsing this forum: No registered users and 5 guests