thankyou
Donate to the B3 fund!

"even a small donation helps!"
Donate with PayPal!
In our support boards we aim to provide support for the B3 core in its current state. Older releases of B3 are NOT supported. Check our front page for the latest version. You may post feature requests in our General Discussion board. Modifications and Hacks of the core B3 code are NOT supported.
Before you ask for support: [ Read the Support Instructions ] - More info: [ Full Support Disclaimer ]

Author Topic: Problem to load external plugins  (Read 1495 times)

Offline falkor

  • Jr. Member
  • **
  • Posts: 20
Problem to load external plugins
« on: April 17, 2014, 04:54:32 PM »
Hi all,

I'm in the process to develop a puppet module for bigbrotherbot and while testing the developped configuration and setup, all my external plugins seems to fail to load, except poweradminurt (I test the installation against urt41).

The interesting part of my generated configuration is below:

plugins section in b3.xml:
<plugins>
    <!-- This plugin provides main B3 functionalities. -->
    <plugin name="admin" config="@conf/plugin_admin.xml"/>

    <!-- Displays round based stats -->
    <plugin name="stats" config="@conf/plugin_stats.xml"/>

    <!-- Writes server status to an xml file - for further use of 3rd party tools -->
    <plugin name="status" config="@conf/plugin_status.xml"/>

    <!-- Welcomes players -->
    <plugin name="welcome" config="@conf/plugin_welcome.xml"/>

    <!-- Write bigtext when someone makes a funny death -->
    <plugin name="funnydeath" config="/var/lib/b3/urt41/conf/plugin_funnydeath.xml"/>
    <!-- Attempt to detect cheaters -->
    <plugin name="haxbusterurt" config="/var/lib/b3/urt41/conf/plugin_haxbusterurt.xml"/>
    <!-- Stats on head shots -->
    <plugin name="headshotsurt" config="/var/lib/b3/urt41/conf/plugin_headshotsurt.ini"/>
    <!-- nader -->
    <plugin name="nader" config="/var/lib/b3/urt41/conf/plugin_nader.xml"/>
    <!-- Warn and remits the players that do not meet the auto-join -->
    <plugin name="pbautojoin" config="/var/lib/b3/urt41/conf/plugin_pbautojoin.ini"/>
    <!-- Gives a nice potion -->
    <plugin name="potion" config="/var/lib/b3/urt41/conf/plugin_potion.xml"/>
    <!-- Power Admin Urt -->
    <plugin name="poweradminurt" config="/var/lib/b3/urt41/conf/plugin_poweradminurt.ini"/>
    <!-- Provide Top killer stats -->
    <plugin name="topkiller" config="/var/lib/b3/urt41/conf/plugin_topkiller.xml"/>
    <!-- Multiple slap / slap to death with !mslap and !bitchslap -->
    <plugin name="urtbslap" config="/var/lib/b3/urt41/conf/plugin_urtbslap.xml"/>
    <!-- To call votes on UrT server through B3 -->
    <plugin name="voting" config="/var/lib/b3/urt41/conf/plugin_voting.xml"/>
  </plugins>

 
b3 logs:

Code: [Select]
140417 16:30:33 BOT     'Plugin status (1.4.13 - ThorN) loaded'
140417 16:30:33 BOT     'Loading Plugin #4 welcome [/var/lib/b3/urt41/conf/plugin_welcome.xml]'
140417 16:30:33 BOT     'WelcomePlugin: Loading config /var/lib/b3/urt41/conf/plugin_welcome.xml for WelcomePlugin'
140417 16:30:33 DEBUG   'AdminPlugin: Command "greeting (None)" registered with cmd_greeting for level (20, 100)'
140417 16:30:33 INFO    'WelcomePlugin: delay set to 30. The bot will wait 30s after a player connects to write the welcome message'
140417 16:30:33 INFO    'WelcomePlugin: min_gap set to 3600. The bot will not welcome a player more than once every 3600 seconds'
140417 16:30:33 DEBUG   'Register Event: Stop Process: WelcomePlugin'
140417 16:30:33 DEBUG   'Register Event: Program Exit: WelcomePlugin'
140417 16:30:33 BOT     'Plugin welcome (1.1 - ThorN) loaded'
140417 16:30:33 BOT     'Loading Plugin #5 funnydeath [/var/lib/b3/urt41/conf/plugin_funnydeath.xml]'
140417 16:30:33 INFO    'funnydeath is not a built-in plugin (No module named funnydeath)'
140417 16:30:33 INFO    'trying external plugin directory : /var/lib/urt/b3/extplugins'
140417 16:30:33 ERROR   'Error loading plugin funnydeath'
Traceback (most recent call last):
  File "/usr/local/lib/python2.6/dist-packages/b3-1.9.2-py2.6.egg/b3/parser.py", line 673, in loadPlugins
    pluginModule = self.pluginImport(plugin_name, plugins[s]['path'])
  File "/usr/local/lib/python2.6/dist-packages/b3-1.9.2-py2.6.egg/b3/parser.py", line 757, in pluginImport
    fp, pathname, description = imp.find_module(name, [self.config.getpath('plugins', 'external_dir')])
ImportError: No module named funnydeath
140417 16:30:33 BOT     'Loading Plugin #6 haxbusterurt [/var/lib/b3/urt41/conf/plugin_haxbusterurt.xml]'
140417 16:30:33 INFO    'cron scheduler started'
140417 16:30:33 INFO    'haxbusterurt is not a built-in plugin (No module named haxbusterurt)'
140417 16:30:33 INFO    'trying external plugin directory : /var/lib/urt/b3/extplugins'
140417 16:30:33 ERROR   'Error loading plugin haxbusterurt'
Traceback (most recent call last):
  File "/usr/local/lib/python2.6/dist-packages/b3-1.9.2-py2.6.egg/b3/parser.py", line 673, in loadPlugins
    pluginModule = self.pluginImport(plugin_name, plugins[s]['path'])
  File "/usr/local/lib/python2.6/dist-packages/b3-1.9.2-py2.6.egg/b3/parser.py", line 757, in pluginImport
    fp, pathname, description = imp.find_module(name, [self.config.getpath('plugins', 'external_dir')])
ImportError: No module named haxbusterurt
140417 16:30:33 BOT     'Loading Plugin #7 headshotsurt [/var/lib/b3/urt41/conf/plugin_headshotsurt.ini]'
140417 16:30:33 INFO    'headshotsurt is not a built-in plugin (No module named headshotsurt)'
140417 16:30:33 INFO    'trying external plugin directory : /var/lib/urt/b3/extplugins'
140417 16:30:33 ERROR   'Error loading plugin headshotsurt'
Traceback (most recent call last):
  File "/usr/local/lib/python2.6/dist-packages/b3-1.9.2-py2.6.egg/b3/parser.py", line 673, in loadPlugins
    pluginModule = self.pluginImport(plugin_name, plugins[s]['path'])
  File "/usr/local/lib/python2.6/dist-packages/b3-1.9.2-py2.6.egg/b3/parser.py", line 757, in pluginImport
    fp, pathname, description = imp.find_module(name, [self.config.getpath('plugins', 'external_dir')])
ImportError: No module named headshotsurt
140417 16:30:33 BOT     'Loading Plugin #8 nader [/var/lib/b3/urt41/conf/plugin_nader.xml]'
140417 16:30:33 INFO    'nader is not a built-in plugin (No module named nader)'
140417 16:30:33 INFO    'trying external plugin directory : /var/lib/urt/b3/extplugins'
140417 16:30:33 ERROR   'Error loading plugin nader'
Traceback (most recent call last):
  File "/usr/local/lib/python2.6/dist-packages/b3-1.9.2-py2.6.egg/b3/parser.py", line 673, in loadPlugins
    pluginModule = self.pluginImport(plugin_name, plugins[s]['path'])
  File "/usr/local/lib/python2.6/dist-packages/b3-1.9.2-py2.6.egg/b3/parser.py", line 757, in pluginImport
    fp, pathname, description = imp.find_module(name, [self.config.getpath('plugins', 'external_dir')])
ImportError: No module named nader
[...]

Directory organization:
[16:48:14] [email protected](uni,DomU) urt41#> pwd && tree -L 2 .
/var/lib/b3/urt41
.
|-- b3.log
|-- b3.log.1
|-- conf
|   |-- b3.xml
|   |-- b3_doc.html
|   |-- plugin_admin.xml
|   |-- plugin_funnydeath.xml
|   |-- plugin_haxbusterurt.xml
|   |-- plugin_headshotsurt.ini
|   |-- plugin_nader.xml
|   |-- plugin_pbautojoin.ini
|   |-- plugin_potion.xml
|   |-- plugin_poweradminurt.ini
|   |-- plugin_stats.xml
|   |-- plugin_status.xml
|   |-- plugin_topkiller.xml
|   |-- plugin_urtbslap.xml
|   |-- plugin_voting.xml
|   `-- plugin_welcome.xml
|-- extplugins
|   |-- funnydeath -> /var/lib/b3/urt41/src/funnydeath/funnydeath/extplugins
|   |-- funnydeath.py -> funnydeath/funnydeath.py
|   |-- haxbusterurt -> /var/lib/b3/urt41/src/haxbusterurt/b3-plugin-haxbusterurt-master/extplugins
|   |-- haxbusterurt.py -> haxbusterurt/haxbusterurt.py
|   |-- headshotsurt -> /var/lib/b3/urt41/src/headshotsurt/b3-plugin-headshotsurt-master/extplugins
|   |-- headshotsurt.py -> headshotsurt/headshotsurt.py
|   |-- nader -> /var/lib/b3/urt41/src/nader/extplugins
|   |-- nader.py -> nader/nader.py
|   |-- pbautojoin -> /var/lib/b3/urt41/src/pbautojoin/extplugins
|   |-- pbautojoin.py -> pbautojoin/pbautojoin.py
|   |-- potion -> /var/lib/b3/urt41/src/potion/potion/extplugins
|   |-- potion.py -> potion/potion.py
|   |-- poweradminurt -> /var/lib/b3/urt41/src/poweradminurt/b3-plugin-poweradminurt-master/extplugins/poweradminurt
|   |-- poweradminurt.py -> poweradminurt/poweradminurt.py
|   |-- topkiller -> /var/lib/b3/urt41/src/topkiller
|   |-- topkiller.py -> topkiller/topkiller.py
|   |-- urtbslap -> /var/lib/b3/urt41/src/urtbslap/extplugins
|   |-- urtbslap.py -> urtbslap/urtbslap.py
|   |-- voting -> /var/lib/b3/urt41/src/voting/Voting V3.2
|   `-- voting.py -> voting/voting.py
|-- scripts
|   `-- bigbrotherbot
`-- src
    |-- b3-plugin-funnydeath.zip
    |-- b3-plugin-haxbusterurt.zip
    |-- b3-plugin-headshotsurt.zip
    |-- b3-plugin-nader.zip
    |-- b3-plugin-pbautojoin.zip
    |-- b3-plugin-potion.zip
    |-- b3-plugin-poweradminurt.zip
    |-- b3-plugin-topkiller.zip
    |-- b3-plugin-urtbslap.zip
    |-- b3-plugin-voting.zip
    |-- funnydeath
    |-- haxbusterurt
    |-- headshotsurt
    |-- nader
    |-- pbautojoin
    |-- potion
    |-- poweradminurt
    |-- topkiller
    |-- urtbslap
    `-- voting

24 directories, 39 files


I'm stuck for a couple or hours now and I would gladly have any piece of help / comment from b3 gurus ;)

Full pastebin :

Before I forgot:
  • OS: Debian GNU/Linux 6.0.9 (squeeze) over Linux 2.6.32-5-xen-amd64
  • B3 type: egg
  • Python: 2.6.6
« Last Edit: April 17, 2014, 04:58:05 PM by falkor »

Offline Courgette

  • Senior Dev.
  • Hero Member
  • *
  • Posts: 4883
    • Github repository
Re: Problem to load external plugins
« Reply #1 on: April 17, 2014, 05:08:23 PM »
what's the content of directory /var/lib/urt/b3/extplugins
according to your b3.xml and b3.log, that the place where B3 expects to find plugins

Offline falkor

  • Jr. Member
  • **
  • Posts: 20
Re: Problem to load external plugins
« Reply #2 on: April 17, 2014, 07:40:30 PM »
what's the content of directory /var/lib/urt/b3/extplugins
according to your b3.xml and b3.log, that the place where B3 expects to find plugins

I put the tree of my file hierarchy :


0 [19:39:14] [email protected](uni,DomU) extplugins#> pwd && tree -L 2 .
/var/lib/b3/urt41/extplugins
.
|-- funnydeath -> /var/lib/b3/urt41/src/funnydeath/funnydeath/extplugins
|-- funnydeath.py -> funnydeath/funnydeath.py
|-- haxbusterurt -> /var/lib/b3/urt41/src/haxbusterurt/b3-plugin-haxbusterurt-master/extplugins
|-- haxbusterurt.py -> haxbusterurt/haxbusterurt.py
|-- headshotsurt -> /var/lib/b3/urt41/src/headshotsurt/b3-plugin-headshotsurt-master/extplugins
|-- headshotsurt.py -> headshotsurt/headshotsurt.py
|-- nader -> /var/lib/b3/urt41/src/nader/extplugins
|-- nader.py -> nader/nader.py
|-- pbautojoin -> /var/lib/b3/urt41/src/pbautojoin/extplugins
|-- pbautojoin.py -> pbautojoin/pbautojoin.py
|-- potion -> /var/lib/b3/urt41/src/potion/potion/extplugins
|-- potion.py -> potion/potion.py
|-- poweradminurt -> /var/lib/b3/urt41/src/poweradminurt/b3-plugin-poweradminurt-master/extplugins/poweradminurt
|-- topkiller -> /var/lib/b3/urt41/src/topkiller
|-- topkiller.py -> topkiller/topkiller.py
|-- urtbslap -> /var/lib/b3/urt41/src/urtbslap/extplugins
|-- urtbslap.py -> urtbslap/urtbslap.py
|-- voting -> /var/lib/b3/urt41/src/voting/Voting V3.2
`-- voting.py -> voting/voting.py

10 directories, 9 files



0 [19:39:21] [email protected](uni,DomU) extplugins#> cd ../src/
0 [19:39:39] [email protected](uni,DomU) src#> pwd && tree -L 2 .
/var/lib/b3/urt41/src
.
|-- b3-plugin-funnydeath.zip
|-- b3-plugin-haxbusterurt.zip
|-- b3-plugin-headshotsurt.zip
|-- b3-plugin-nader.zip
|-- b3-plugin-pbautojoin.zip
|-- b3-plugin-potion.zip
|-- b3-plugin-poweradminurt.zip
|-- b3-plugin-topkiller.zip
|-- b3-plugin-urtbslap.zip
|-- b3-plugin-voting.zip
|-- funnydeath
|   `-- funnydeath
|-- haxbusterurt
|   `-- b3-plugin-haxbusterurt-master
|-- headshotsurt
|   `-- b3-plugin-headshotsurt-master
|-- nader
|   |-- extplugins
|   `-- readme.txt
|-- pbautojoin
|   |-- extplugins
|   `-- readme.txt
|-- potion
|   `-- potion
|-- poweradminurt
|   `-- b3-plugin-poweradminurt-master
|-- topkiller
|   |-- plugin_topkiller.xml
|   `-- topkiller.py
|-- urtbslap
|   |-- extplugins
|   `-- readme.txt
`-- voting
    `-- Voting V3.2

19 directories, 15 files

Offline falkor

  • Jr. Member
  • **
  • Posts: 20
Re: Problem to load external plugins
« Reply #3 on: April 17, 2014, 07:41:56 PM »
arg forgot my answer, you got the point ;) bad erb replacement

Gracias!

 


Rate this page +1 at Google Search