We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Error in alpha with built-in audacity appmod
### Steps to reproduce:

1. open audacity.
2. select audio. ctrl+a works.
3. press alt+c, and press c until "compresser" is found.
4. press enter.
5. press tab.

### Actual behavior:

```
ERROR - eventHandler.executeEvent (23:07:33.553):
error executing event: gainFocus on <NVDAObjects.IAccessible.IAccessible object at 0x03318FF0> with extra args of {}
Traceback (most recent call last):
  File "eventHandler.pyc", line 150, in executeEvent
  File "eventHandler.pyc", line 163, in doPreGainFocus
  File "api.pyc", line 109, in setFocusObject
  File "baseObject.pyc", line 46, in __get__
  File "baseObject.pyc", line 149, in _getPropertyViaCache
  File "NVDAObjects\IAccessible\__init__.pyc", line 1695, in _get_container
  File "IAccessibleHandler.pyc", line 950, in findGroupboxObject
  File "NVDAObjects\IAccessible\__init__.pyc", line 48, in getNVDAObjectFromEvent
  File "NVDAObjects\__init__.pyc", line 137, in __call__
  File "appModules\audacity.pyc", line 15, in event_NVDAObject_init
AttributeError: 'NoneType' object has no attribute 'replace'
```

### Expected behavior:

Items in the UI read.

### System configuration
#### NVDA installed/portable/running from source:
installed

#### NVDA version:
Version: alpha-18399,26485a09


#### Windows version:
^10

#### Name and version of other software in use when reproducing the issue:
Audacity: 2.3.1



--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `source/appModules/audacity.py`
Content:
```
1 # -*- coding: UTF-8 -*-
2 #appModules/audacity.py
3 #A part of NonVisual Desktop Access (NVDA)
4 #Copyright (C) 2006-2018 NV Access Limited, Robert Hänggi
5 #This file is covered by the GNU General Public License.
6 #See the file COPYING for more details.
7 
8 import appModuleHandler
9 import controlTypes
10 
11 class AppModule(appModuleHandler.AppModule):
12 
13 	def event_NVDAObject_init(self,obj):
14 		if obj.windowClassName=="Button" and not obj.role in [controlTypes.ROLE_MENUBAR, controlTypes.ROLE_MENUITEM, controlTypes.ROLE_POPUPMENU]:
15 			obj.name=obj.name.replace('&','')
16
```
--- 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/source/appModules/audacity.py b/source/appModules/audacity.py
--- a/source/appModules/audacity.py
+++ b/source/appModules/audacity.py
@@ -1,9 +1,8 @@
 # -*- coding: UTF-8 -*-
-#appModules/audacity.py
-#A part of NonVisual Desktop Access (NVDA)
-#Copyright (C) 2006-2018 NV Access Limited, Robert Hänggi
-#This file is covered by the GNU General Public License.
-#See the file COPYING for more details.
+# A part of NonVisual Desktop Access (NVDA)
+# Copyright (C) 2006-2019 NV Access Limited, Robert Hänggi, Łukasz Golonka
+# This file is covered by the GNU General Public License.
+# See the file COPYING for more details.
 
 import appModuleHandler
 import controlTypes
@@ -11,5 +10,9 @@
 class AppModule(appModuleHandler.AppModule):
 
 	def event_NVDAObject_init(self,obj):
-		if obj.windowClassName=="Button" and not obj.role in [controlTypes.ROLE_MENUBAR, controlTypes.ROLE_MENUITEM, controlTypes.ROLE_POPUPMENU]:
+		if (
+			obj.windowClassName == "Button"
+			and obj.role not in [controlTypes.ROLE_MENUBAR, controlTypes.ROLE_MENUITEM, controlTypes.ROLE_POPUPMENU]
+			and obj.name is not None
+		):
 			obj.name=obj.name.replace('&','')

{"golden_diff": "diff --git a/source/appModules/audacity.py b/source/appModules/audacity.py\n--- a/source/appModules/audacity.py\n+++ b/source/appModules/audacity.py\n@@ -1,9 +1,8 @@\n # -*- coding: UTF-8 -*-\r\n-#appModules/audacity.py\r\n-#A part of NonVisual Desktop Access (NVDA)\r\n-#Copyright (C) 2006-2018 NV Access Limited, Robert H\u00e4nggi\r\n-#This file is covered by the GNU General Public License.\r\n-#See the file COPYING for more details.\r\n+# A part of NonVisual Desktop Access (NVDA)\r\n+# Copyright (C) 2006-2019 NV Access Limited, Robert H\u00e4nggi, \u0141ukasz Golonka\r\n+# This file is covered by the GNU General Public License.\r\n+# See the file COPYING for more details.\r\n \r\n import appModuleHandler\r\n import controlTypes\r\n@@ -11,5 +10,9 @@\n class AppModule(appModuleHandler.AppModule):\r\n \r\n \tdef event_NVDAObject_init(self,obj):\r\n-\t\tif obj.windowClassName==\"Button\" and not obj.role in [controlTypes.ROLE_MENUBAR, controlTypes.ROLE_MENUITEM, controlTypes.ROLE_POPUPMENU]:\r\n+\t\tif (\r\n+\t\t\tobj.windowClassName == \"Button\"\r\n+\t\t\tand obj.role not in [controlTypes.ROLE_MENUBAR, controlTypes.ROLE_MENUITEM, controlTypes.ROLE_POPUPMENU]\r\n+\t\t\tand obj.name is not None\r\n+\t\t):\r\n \t\t\tobj.name=obj.name.replace('&','')\n", "issue": "Error in alpha with built-in audacity appmod\n### Steps to reproduce:\r\n\r\n1. open audacity.\r\n2. select audio. ctrl+a works.\r\n3. press alt+c, and press c until \"compresser\" is found.\r\n4. press enter.\r\n5. press tab.\r\n\r\n### Actual behavior:\r\n\r\n```\r\nERROR - eventHandler.executeEvent (23:07:33.553):\r\nerror executing event: gainFocus on <NVDAObjects.IAccessible.IAccessible object at 0x03318FF0> with extra args of {}\r\nTraceback (most recent call last):\r\n  File \"eventHandler.pyc\", line 150, in executeEvent\r\n  File \"eventHandler.pyc\", line 163, in doPreGainFocus\r\n  File \"api.pyc\", line 109, in setFocusObject\r\n  File \"baseObject.pyc\", line 46, in __get__\r\n  File \"baseObject.pyc\", line 149, in _getPropertyViaCache\r\n  File \"NVDAObjects\\IAccessible\\__init__.pyc\", line 1695, in _get_container\r\n  File \"IAccessibleHandler.pyc\", line 950, in findGroupboxObject\r\n  File \"NVDAObjects\\IAccessible\\__init__.pyc\", line 48, in getNVDAObjectFromEvent\r\n  File \"NVDAObjects\\__init__.pyc\", line 137, in __call__\r\n  File \"appModules\\audacity.pyc\", line 15, in event_NVDAObject_init\r\nAttributeError: 'NoneType' object has no attribute 'replace'\r\n```\r\n\r\n### Expected behavior:\r\n\r\nItems in the UI read.\r\n\r\n### System configuration\r\n#### NVDA installed/portable/running from source:\r\ninstalled\r\n\r\n#### NVDA version:\r\nVersion: alpha-18399,26485a09\r\n\r\n\r\n#### Windows version:\r\n^10\r\n\r\n#### Name and version of other software in use when reproducing the issue:\r\nAudacity: 2.3.1\r\n\r\n\n", "before_files": [{"content": "# -*- coding: UTF-8 -*-\r\n#appModules/audacity.py\r\n#A part of NonVisual Desktop Access (NVDA)\r\n#Copyright (C) 2006-2018 NV Access Limited, Robert H\u00e4nggi\r\n#This file is covered by the GNU General Public License.\r\n#See the file COPYING for more details.\r\n\r\nimport appModuleHandler\r\nimport controlTypes\r\n\r\nclass AppModule(appModuleHandler.AppModule):\r\n\r\n\tdef event_NVDAObject_init(self,obj):\r\n\t\tif obj.windowClassName==\"Button\" and not obj.role in [controlTypes.ROLE_MENUBAR, controlTypes.ROLE_MENUITEM, controlTypes.ROLE_POPUPMENU]:\r\n\t\t\tobj.name=obj.name.replace('&','')\r\n", "path": "source/appModules/audacity.py"}], "after_files": [{"content": "# -*- coding: UTF-8 -*-\r\n# A part of NonVisual Desktop Access (NVDA)\r\n# Copyright (C) 2006-2019 NV Access Limited, Robert H\u00e4nggi, \u0141ukasz Golonka\r\n# This file is covered by the GNU General Public License.\r\n# See the file COPYING for more details.\r\n\r\nimport appModuleHandler\r\nimport controlTypes\r\n\r\nclass AppModule(appModuleHandler.AppModule):\r\n\r\n\tdef event_NVDAObject_init(self,obj):\r\n\t\tif (\r\n\t\t\tobj.windowClassName == \"Button\"\r\n\t\t\tand obj.role not in [controlTypes.ROLE_MENUBAR, controlTypes.ROLE_MENUITEM, controlTypes.ROLE_POPUPMENU]\r\n\t\t\tand obj.name is not None\r\n\t\t):\r\n\t\t\tobj.name=obj.name.replace('&','')\r\n", "path": "source/appModules/audacity.py"}]}