Closed SnoopJ closed 9 months ago
As @Exirel pointed out on IRC, we will also need a regression test for this bug if the error is not the intended behavior.
Guess I didn't use one of the approved closing keywords in #2510, whoops. This should be fixed now.
Description
The
modes
attribute of theCoreSection
configuration object may beNone
under some circumstances where the attribute value is defaulted, as the old default ('B'
) was removed in 9e8a01d. This can cause failure elsewhere in the bot when membership against themodes
attribute is checked.The change in the default behavior seems very deliberate and this may have just slipped past us (I'll let @dgw weigh in on that), but even if this error is the intended behavior, we should be able to produce a better error report in this case.
Reproduction steps
Note: I am reporting on behalf of user
Puzfire
from IRC. In lieu of a reproduction, channel log and user paste (from 24 Sept 2023) are given below:IRC log
``` 09:08User's config/log paste
``` ~/.sopel/default.cfg [core] nick = pybot host = 172.16.1.7 use_ssl = true verify_ssl = false port = 9977 owner = Meta auth_method = server auth_password = Password channels = "#CHAT", "#Staff", prefix = ! user = service flood_burst_lines = 100 flood_empty_wait = 0.5 flood_refill_rate = 2 commands_on_connect = connect string: #################################################### $ sopel start Warning: FreeBSD is an uncommon operating system platform. Sopel should still work, but please contact Sopel's developers if you experience issues. Sopel 8.0.0.dev0 (running on Python 3.9.18) https://sopel.chat/ Loaded config file: /home/ircbot/.sopel/default.cfg [2023-09-24 12:59:31,509] sopel.bot INFO - Loading plugins... [2023-09-24 12:59:31,532] sopel.bot INFO - Plugin loaded: admin [2023-09-24 12:59:31,534] sopel.bot INFO - Plugin loaded: announce [2023-09-24 12:59:31,548] sopel.bot INFO - Plugin loaded: adminchannel [2023-09-24 12:59:31,550] sopel.bot INFO - Plugin loaded: countdown [2023-09-24 12:59:31,992] sopel.bot INFO - Plugin loaded: help [2023-09-24 12:59:32,000] sopel.bot INFO - Plugin loaded: coretasks [2023-09-24 12:59:32,000] sopel.bot INFO - Registered 5 plugins, 0 failed, 0 disabled [2023-09-24 12:59:32,002] asyncio DEBUG - Using selector: KqueueSelector [2023-09-24 12:59:32,020] sopel.irc INFO - Connected, initiating setup sequence [2023-09-24 12:59:32,022] sopel.bot INFO - Client capability negotiation list: inspircd.org/poison, tls [2023-09-24 12:59:32,022] sopel.coretasks INFO - No capability negotiation. [2023-09-24 12:59:33,115] sopel.coretasks INFO - Enabled client capabilities: [2023-09-24 12:59:33,116] sopel.coretasks INFO - No custom command to execute. [2023-09-24 12:59:33,117] sopel.coretasks INFO - Received RPL_MYINFO from server: pybot, myircserver, InspIRCd-3 [2023-09-24 12:59:33,118] sopel.bot ERROR - Unexpected TypeError (argument of type 'NoneType' is not iterable) from Tessier-Ashpool.cbl. Message was: are supported by this server Traceback (most recent call last): File "/usr/home/ircbot/sopel/sopel/bot.py", line 699, in call_rule rule.execute(sopel, trigger) File "/usr/home/ircbot/sopel/sopel/plugins/rules.py", line 1262, in execute exit_code = self._handler(bot, trigger) File "/usr/home/ircbot/sopel/sopel/coretasks.py", line 466, in handle_isupport if botmode not in bot.config.core.modes: TypeError: argument of type 'NoneType' is not iterable [2023-09-24 12:59:33,142] sopel.coretasks INFO - Joining 2 channels (with JOIN throttle OFF); this may take a moment. [core] nick = pybot host = 172.16.1.7 [2023-09-24 12:59:33,144] sopel.coretasks INFO - Channel joined: #Chat [2023-09-24 12:59:33,145] sopel.coretasks INFO - Channel's topic updated: #Chat [2023-09-24 12:59:33,163] sopel.coretasks INFO - Channel joined: #STAFF [2023-09-24 12:59:33,164] sopel.coretasks INFO - Channel's topic updated: #STAFF [2023-09-24 12:59:33,166] sopel.coretasks INFO - Updated mode for channel: #Chat [2023-09-24 12:59:33,186] sopel.coretasks INFO - Updated mode for channel: #STAFF ```Expected behavior
No error is issued, or a better error report is issued explaining that the parameter needs to be manually configured.
Relevant logs
No response
Notes
No response
Sopel version
274470e
Installation method
pip install
Python version
No response
Operating system
No response
IRCd
No response
Relevant plugins
No response