We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
If someone links a template URL with a section fragment, Sopel outputs an unexpected error.
[2021-07-24 17:12:47,036] sopel.bot ERROR - Unexpected error ('parse') from dgw at 2021-07-24 22:12:47.036637. Message was: https://en.wikipedia.org/wiki/Template:Infobox_company#TemplateData Traceback (most recent call last): File "/data/data/com.termux/files/usr/lib/python3.9/site-packages/sopel/bot.py", line 757, in call_rule rule.execute(sopel, trigger) File "/data/data/com.termux/files/usr/lib/python3.9/site-packages/sopel/plugins/rules.py", line 1057, in execute exit_code = self._handler(bot, trigger) File "/data/data/com.termux/files/usr/lib/python3.9/site-packages/sopel/plugins/rules.py", line 1608, in execute_handler return handler(bot, trigger, match=trigger) File "/data/data/com.termux/files/usr/lib/python3.9/site-packages/sopel/modules/wikipedia.py", line 256, in mw_info say_section(bot, trigger, match.group(1), unquote(match.group(2)), unquote(match.group(3))) File "/data/data/com.termux/files/usr/lib/python3.9/site-packages/sopel/modules/wikipedia.py", line 204, in say_section snippet = mw_section(server, query, section) File "/data/data/com.termux/files/usr/lib/python3.9/site-packages/sopel/modules/wikipedia.py", line 240, in mw_section parser.feed(data['parse']['text']['*']) KeyError: 'parse'
.version
/version
The same template URL with no fragment yields a perfectly functional, but useless, empty snippet.
<SopelTest> [wikipedia] Template:Infobox company | ""
The text was updated successfully, but these errors were encountered:
Bit more digging in API docs and test requests, and I should have a patch for this tonight.
Sorry, something went wrong.
dgw
Successfully merging a pull request may close this issue.
Description
If someone links a template URL with a section fragment, Sopel outputs an unexpected error.
Logs
Environment
.version
: 7.1.2/version
: plexus-4(hybrid-8.1.20)(20200510_0-610). irc.rizon.ca TS6owNotes
The same template URL with no fragment yields a perfectly functional, but useless, empty snippet.
The text was updated successfully, but these errors were encountered: