We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
AttributeError: 'NoneType' object has no attribute 'strip' (file "/usr/local/lib/python2.7/dist-packages/sopel/modules/unicode_info.py", line 23, in codepoint)
[01:04am] <Ant> .u
01:04AM <Sopel> AttributeError: 'NoneType' object has no attribute 'strip' (file "/usr/local/lib/python2.7/dist-packages/sopel/modules/unicode_info.py", line 23, in codepoint)
01:04AM <Sopel> Ant: Sopel v. 6.1.1

This is in my Debian oldstable with Python v2.7.3. :(

AttributeError: 'NoneType' object has no attribute 'strip' (file "/usr/local/lib/python2.7/dist-packages/sopel/modules/unicode_info.py", line 23, in codepoint)
[01:04am] <Ant> .u
01:04AM <Sopel> AttributeError: 'NoneType' object has no attribute 'strip' (file "/usr/local/lib/python2.7/dist-packages/sopel/modules/unicode_info.py", line 23, in codepoint)
01:04AM <Sopel> Ant: Sopel v. 6.1.1

This is in my Debian oldstable with Python v2.7.3. :(


--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `sopel/modules/unicode_info.py`
Content:
```
1 # coding=utf-8
2 """Codepoints Module"""
3 # Copyright 2013, Elsie Powell, embolalia.com
4 # Copyright 2008, Sean B. Palmer, inamidst.com
5 # Licensed under the Eiffel Forum License 2.
6 from __future__ import unicode_literals, absolute_import, print_function, division
7 import unicodedata
8 import sys
9 from sopel.module import commands, example, NOLIMIT
10 
11 if sys.version_info.major >= 3:
12     unichr = chr
13 
14 
15 @commands('u')
16 @example('.u ‽', 'U+203D INTERROBANG (‽)')
17 @example('.u 203D', 'U+203D INTERROBANG (‽)')
18 def codepoint(bot, trigger):
19     arg = trigger.group(2).strip()
20     if len(arg) == 0:
21         bot.reply('What code point do you want me to look up?')
22         return NOLIMIT
23     elif len(arg) > 1:
24         if arg.startswith('U+'):
25             arg = arg[2:]
26         try:
27             arg = unichr(int(arg, 16))
28         except:
29             bot.reply("That's not a valid code point.")
30             return NOLIMIT
31 
32     # Get the hex value for the code point, and drop the 0x from the front
33     point = str(hex(ord(u'' + arg)))[2:]
34     # Make the hex 4 characters long with preceding 0s, and all upper case
35     point = point.rjust(4, str('0')).upper()
36     try:
37         name = unicodedata.name(arg)
38     except ValueError:
39         return 'U+%s (No name found)' % point
40 
41     if not unicodedata.combining(arg):
42         template = 'U+%s %s (%s)'
43     else:
44         template = 'U+%s %s (\xe2\x97\x8c%s)'
45     bot.say(template % (point, name, arg))
46 
47 if __name__ == "__main__":
48     from sopel.test_tools import run_example_tests
49     run_example_tests(__file__)
50
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/sopel/modules/unicode_info.py b/sopel/modules/unicode_info.py
--- a/sopel/modules/unicode_info.py
+++ b/sopel/modules/unicode_info.py
@@ -16,11 +16,14 @@
 @example('.u ‽', 'U+203D INTERROBANG (‽)')
 @example('.u 203D', 'U+203D INTERROBANG (‽)')
 def codepoint(bot, trigger):
-    arg = trigger.group(2).strip()
-    if len(arg) == 0:
+    arg = trigger.group(2)
+    if not arg:
         bot.reply('What code point do you want me to look up?')
         return NOLIMIT
-    elif len(arg) > 1:
+    stripped = arg.strip()
+    if len(stripped) > 0:
+        arg = stripped
+    if len(arg) > 1:
         if arg.startswith('U+'):
             arg = arg[2:]
         try:

{"golden_diff": "diff --git a/sopel/modules/unicode_info.py b/sopel/modules/unicode_info.py\n--- a/sopel/modules/unicode_info.py\n+++ b/sopel/modules/unicode_info.py\n@@ -16,11 +16,14 @@\n @example('.u \u203d', 'U+203D INTERROBANG (\u203d)')\n @example('.u 203D', 'U+203D INTERROBANG (\u203d)')\n def codepoint(bot, trigger):\n-    arg = trigger.group(2).strip()\n-    if len(arg) == 0:\n+    arg = trigger.group(2)\n+    if not arg:\n         bot.reply('What code point do you want me to look up?')\n         return NOLIMIT\n-    elif len(arg) > 1:\n+    stripped = arg.strip()\n+    if len(stripped) > 0:\n+        arg = stripped\n+    if len(arg) > 1:\n         if arg.startswith('U+'):\n             arg = arg[2:]\n         try:\n", "issue": "AttributeError: 'NoneType' object has no attribute 'strip' (file \"/usr/local/lib/python2.7/dist-packages/sopel/modules/unicode_info.py\", line 23, in codepoint)\n[01:04am] <Ant> .u\n01:04AM <Sopel> AttributeError: 'NoneType' object has no attribute 'strip' (file \"/usr/local/lib/python2.7/dist-packages/sopel/modules/unicode_info.py\", line 23, in codepoint)\n01:04AM <Sopel> Ant: Sopel v. 6.1.1\n\nThis is in my Debian oldstable with Python v2.7.3. :(\n\nAttributeError: 'NoneType' object has no attribute 'strip' (file \"/usr/local/lib/python2.7/dist-packages/sopel/modules/unicode_info.py\", line 23, in codepoint)\n[01:04am] <Ant> .u\n01:04AM <Sopel> AttributeError: 'NoneType' object has no attribute 'strip' (file \"/usr/local/lib/python2.7/dist-packages/sopel/modules/unicode_info.py\", line 23, in codepoint)\n01:04AM <Sopel> Ant: Sopel v. 6.1.1\n\nThis is in my Debian oldstable with Python v2.7.3. :(\n\n", "before_files": [{"content": "# coding=utf-8\n\"\"\"Codepoints Module\"\"\"\n# Copyright 2013, Elsie Powell, embolalia.com\n# Copyright 2008, Sean B. Palmer, inamidst.com\n# Licensed under the Eiffel Forum License 2.\nfrom __future__ import unicode_literals, absolute_import, print_function, division\nimport unicodedata\nimport sys\nfrom sopel.module import commands, example, NOLIMIT\n\nif sys.version_info.major >= 3:\n    unichr = chr\n\n\n@commands('u')\n@example('.u \u203d', 'U+203D INTERROBANG (\u203d)')\n@example('.u 203D', 'U+203D INTERROBANG (\u203d)')\ndef codepoint(bot, trigger):\n    arg = trigger.group(2).strip()\n    if len(arg) == 0:\n        bot.reply('What code point do you want me to look up?')\n        return NOLIMIT\n    elif len(arg) > 1:\n        if arg.startswith('U+'):\n            arg = arg[2:]\n        try:\n            arg = unichr(int(arg, 16))\n        except:\n            bot.reply(\"That's not a valid code point.\")\n            return NOLIMIT\n\n    # Get the hex value for the code point, and drop the 0x from the front\n    point = str(hex(ord(u'' + arg)))[2:]\n    # Make the hex 4 characters long with preceding 0s, and all upper case\n    point = point.rjust(4, str('0')).upper()\n    try:\n        name = unicodedata.name(arg)\n    except ValueError:\n        return 'U+%s (No name found)' % point\n\n    if not unicodedata.combining(arg):\n        template = 'U+%s %s (%s)'\n    else:\n        template = 'U+%s %s (\\xe2\\x97\\x8c%s)'\n    bot.say(template % (point, name, arg))\n\nif __name__ == \"__main__\":\n    from sopel.test_tools import run_example_tests\n    run_example_tests(__file__)\n", "path": "sopel/modules/unicode_info.py"}], "after_files": [{"content": "# coding=utf-8\n\"\"\"Codepoints Module\"\"\"\n# Copyright 2013, Elsie Powell, embolalia.com\n# Copyright 2008, Sean B. Palmer, inamidst.com\n# Licensed under the Eiffel Forum License 2.\nfrom __future__ import unicode_literals, absolute_import, print_function, division\nimport unicodedata\nimport sys\nfrom sopel.module import commands, example, NOLIMIT\n\nif sys.version_info.major >= 3:\n    unichr = chr\n\n\n@commands('u')\n@example('.u \u203d', 'U+203D INTERROBANG (\u203d)')\n@example('.u 203D', 'U+203D INTERROBANG (\u203d)')\ndef codepoint(bot, trigger):\n    arg = trigger.group(2)\n    if not arg:\n        bot.reply('What code point do you want me to look up?')\n        return NOLIMIT\n    stripped = arg.strip()\n    if len(stripped) > 0:\n        arg = stripped\n    if len(arg) > 1:\n        if arg.startswith('U+'):\n            arg = arg[2:]\n        try:\n            arg = unichr(int(arg, 16))\n        except:\n            bot.reply(\"That's not a valid code point.\")\n            return NOLIMIT\n\n    # Get the hex value for the code point, and drop the 0x from the front\n    point = str(hex(ord(u'' + arg)))[2:]\n    # Make the hex 4 characters long with preceding 0s, and all upper case\n    point = point.rjust(4, str('0')).upper()\n    try:\n        name = unicodedata.name(arg)\n    except ValueError:\n        return 'U+%s (No name found)' % point\n\n    if not unicodedata.combining(arg):\n        template = 'U+%s %s (%s)'\n    else:\n        template = 'U+%s %s (\\xe2\\x97\\x8c%s)'\n    bot.say(template % (point, name, arg))\n\nif __name__ == \"__main__\":\n    from sopel.test_tools import run_example_tests\n    run_example_tests(__file__)\n", "path": "sopel/modules/unicode_info.py"}]}