We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Qtile loggin with default config
Hi today when i loggin in my arch linux with qtile, opened with default config. i see another post with similar problem but dont work. This is the log of qtile:

```
2021-02-22 13:35:55,667 WARNING libqtile lifecycle.py:_atexit():L38 Qtile will now terminate
2021-02-22 13:36:01,032 WARNING libqtile floating.py:__init__():L109 Non-config.Match objects in float_rules are deprecated
2021-02-22 13:36:01,032 ERROR libqtile confreader.py:load():L106 Could not import config file '/home/sailentk/.config/qtile/config.py'
Traceback (most recent call last):
  File "/usr/lib/python3.9/site-packages/libqtile/confreader.py", line 101, in load
    config = __import__(name)  # noqa: F811
  File "/home/sailentk/.config/qtile/config.py", line 9, in <module>
    from settings.widgets import widget_defaults, extension_defaults
  File "/home/sailentk/.config/qtile/settings/widgets.py", line 64, in <module>
    widget.Pacman(**base(bg='color4'), update_interval=1800),
  File "/usr/lib/python3.9/site-packages/libqtile/utils.py", line 226, in __getattr__
    raise AttributeError
AttributeError
2021-02-22 13:36:01,033 ERROR libqtile manager.py:load_config():L107 Error while reading config file (Traceback (most recent call last):
  File "/usr/lib/python3.9/site-packages/libqtile/confreader.py", line 101, in load
    config = __import__(name)  # noqa: F811
  File "/home/sailentk/.config/qtile/config.py", line 9, in <module>
    from settings.widgets import widget_defaults, extension_defaults
  File "/home/sailentk/.config/qtile/settings/widgets.py", line 64, in <module>
    widget.Pacman(**base(bg='color4'), update_interval=1800),
  File "/usr/lib/python3.9/site-packages/libqtile/utils.py", line 226, in __getattr__
    raise AttributeError
AttributeError
)
Traceback (most recent call last):
  File "/usr/lib/python3.9/site-packages/libqtile/confreader.py", line 101, in load
    config = __import__(name)  # noqa: F811
  File "/home/sailentk/.config/qtile/config.py", line 9, in <module>
    from settings.widgets import widget_defaults, extension_defaults
  File "/home/sailentk/.config/qtile/settings/widgets.py", line 64, in <module>
    widget.Pacman(**base(bg='color4'), update_interval=1800),
  File "/usr/lib/python3.9/site-packages/libqtile/utils.py", line 226, in __getattr__
    raise AttributeError
AttributeError

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3.9/site-packages/libqtile/core/manager.py", line 104, in load_config
    self.config.load()
  File "/usr/lib/python3.9/site-packages/libqtile/confreader.py", line 108, in load
    raise ConfigError(tb)
libqtile.confreader.ConfigError: Traceback (most recent call last):
  File "/usr/lib/python3.9/site-packages/libqtile/confreader.py", line 101, in load
    config = __import__(name)  # noqa: F811
  File "/home/sailentk/.config/qtile/config.py", line 9, in <module>
    from settings.widgets import widget_defaults, extension_defaults
  File "/home/sailentk/.config/qtile/settings/widgets.py", line 64, in <module>
    widget.Pacman(**base(bg='color4'), update_interval=1800),
  File "/usr/lib/python3.9/site-packages/libqtile/utils.py", line 226, in __getattr__
    raise AttributeError
AttributeError
```

--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `libqtile/scripts/migrate.py`
Content:
```
1 # Copyright (c) 2021, Tycho Andersen. All rights reserved.
2 #
3 # Permission is hereby granted, free of charge, to any person obtaining a copy
4 # of this software and associated documentation files (the "Software"), to deal
5 # in the Software without restriction, including without limitation the rights
6 # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7 # copies of the Software, and to permit persons to whom the Software is
8 # furnished to do so, subject to the following conditions:
9 #
10 # The above copyright notice and this permission notice shall be included in
11 # all copies or substantial portions of the Software.
12 #
13 # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14 # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15 # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16 # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17 # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18 # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19 import os
20 import os.path
21 import shutil
22 import sys
23 
24 BACKUP_SUFFIX = ".migrate.bak"
25 
26 try:
27     import bowler
28 except ImportError:
29     pass
30 
31 
32 def rename_hook(config, fro, to):
33     # could match on dotted_name< 'hook' '.' 'subscribe' '.' '{name}' >
34     # but the replacement gets more complicated...
35     selector = "'{name}'".format(name=fro)
36     q = bowler.Query(config).select_pattern(selector)
37     q.current.kwargs["name"] = fro
38     return q.rename(to)
39 
40 
41 def client_name_updated(config):
42     """ Rename window_name_change -> client_name_updated"""
43     return rename_hook(config, "window_name_change", "client_name_updated")
44 
45 
46 def tile_master_windows_rename(config):
47     return (
48         bowler.Query(config)
49         .select_function("Tile")
50         .modify_argument("masterWindows", "master_length")
51     )
52 
53 
54 def threaded_poll_text_rename(config):
55     return (
56         bowler.Query(config)
57         .select_class("ThreadedPollText")
58         .rename("ThreadPoolText")
59     )
60 
61 
62 MIGRATIONS = [
63     client_name_updated,
64     tile_master_windows_rename,
65     threaded_poll_text_rename,
66 ]
67 
68 
69 MODULE_RENAMES = [
70     ("libqtile.command_graph", "libqtile.command.graph"),
71     ("libqtile.command_client", "libqtile.command.client"),
72     ("libqtile.command_interface", "libqtile.command.interface"),
73     ("libqtile.command_object", "libqtile.command.object"),
74 ]
75 
76 for (fro, to) in MODULE_RENAMES:
77     def f(config, fro=fro, to=to):
78         return (
79             bowler.Query(config)
80             .select_module(fro)
81             .rename(to)
82         )
83     MIGRATIONS.append(f)
84 
85 
86 def do_migrate(args):
87     if "bowler" not in sys.modules:
88         print("bowler can't be found, not migrating config file")
89         print("install it and try again")
90         sys.exit(1)
91 
92     shutil.copyfile(args.config, args.config+BACKUP_SUFFIX)
93 
94     for m in MIGRATIONS:
95         m(args.config).execute(interactive=args.interactive, write=True)
96 
97 
98 def add_subcommand(subparsers):
99     parser = subparsers.add_parser(
100         "migrate", help="Migrate a configuration file to the current API"
101     )
102     parser.add_argument(
103         "-c",
104         "--config",
105         action="store",
106         default=os.path.expanduser(
107             os.path.join(os.getenv("XDG_CONFIG_HOME", "~/.config"), "qtile", "config.py")
108         ),
109         help="Use the specified configuration file",
110     )
111     parser.add_argument(
112         "--interactive",
113         action="store_true",
114         help="Interactively apply diff (similar to git add -p)",
115     )
116     parser.set_defaults(func=do_migrate)
117
```
--- 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/libqtile/scripts/migrate.py b/libqtile/scripts/migrate.py
--- a/libqtile/scripts/migrate.py
+++ b/libqtile/scripts/migrate.py
@@ -59,10 +59,19 @@
     )
 
 
+def pacman_to_checkupdates(config):
+    return (
+        bowler.Query(config)
+        .select_class("Pacman")
+        .rename("CheckUpdates")
+    )
+
+
 MIGRATIONS = [
     client_name_updated,
     tile_master_windows_rename,
     threaded_poll_text_rename,
+    pacman_to_checkupdates,
 ]

{"golden_diff": "diff --git a/libqtile/scripts/migrate.py b/libqtile/scripts/migrate.py\n--- a/libqtile/scripts/migrate.py\n+++ b/libqtile/scripts/migrate.py\n@@ -59,10 +59,19 @@\n     )\n \n \n+def pacman_to_checkupdates(config):\n+    return (\n+        bowler.Query(config)\n+        .select_class(\"Pacman\")\n+        .rename(\"CheckUpdates\")\n+    )\n+\n+\n MIGRATIONS = [\n     client_name_updated,\n     tile_master_windows_rename,\n     threaded_poll_text_rename,\n+    pacman_to_checkupdates,\n ]\n", "issue": "Qtile loggin with default config\nHi today when i loggin in my arch linux with qtile, opened with default config. i see another post with similar problem but dont work. This is the log of qtile:\r\n\r\n```\r\n2021-02-22 13:35:55,667 WARNING libqtile lifecycle.py:_atexit():L38 Qtile will now terminate\r\n2021-02-22 13:36:01,032 WARNING libqtile floating.py:__init__():L109 Non-config.Match objects in float_rules are deprecated\r\n2021-02-22 13:36:01,032 ERROR libqtile confreader.py:load():L106 Could not import config file '/home/sailentk/.config/qtile/config.py'\r\nTraceback (most recent call last):\r\n  File \"/usr/lib/python3.9/site-packages/libqtile/confreader.py\", line 101, in load\r\n    config = __import__(name)  # noqa: F811\r\n  File \"/home/sailentk/.config/qtile/config.py\", line 9, in <module>\r\n    from settings.widgets import widget_defaults, extension_defaults\r\n  File \"/home/sailentk/.config/qtile/settings/widgets.py\", line 64, in <module>\r\n    widget.Pacman(**base(bg='color4'), update_interval=1800),\r\n  File \"/usr/lib/python3.9/site-packages/libqtile/utils.py\", line 226, in __getattr__\r\n    raise AttributeError\r\nAttributeError\r\n2021-02-22 13:36:01,033 ERROR libqtile manager.py:load_config():L107 Error while reading config file (Traceback (most recent call last):\r\n  File \"/usr/lib/python3.9/site-packages/libqtile/confreader.py\", line 101, in load\r\n    config = __import__(name)  # noqa: F811\r\n  File \"/home/sailentk/.config/qtile/config.py\", line 9, in <module>\r\n    from settings.widgets import widget_defaults, extension_defaults\r\n  File \"/home/sailentk/.config/qtile/settings/widgets.py\", line 64, in <module>\r\n    widget.Pacman(**base(bg='color4'), update_interval=1800),\r\n  File \"/usr/lib/python3.9/site-packages/libqtile/utils.py\", line 226, in __getattr__\r\n    raise AttributeError\r\nAttributeError\r\n)\r\nTraceback (most recent call last):\r\n  File \"/usr/lib/python3.9/site-packages/libqtile/confreader.py\", line 101, in load\r\n    config = __import__(name)  # noqa: F811\r\n  File \"/home/sailentk/.config/qtile/config.py\", line 9, in <module>\r\n    from settings.widgets import widget_defaults, extension_defaults\r\n  File \"/home/sailentk/.config/qtile/settings/widgets.py\", line 64, in <module>\r\n    widget.Pacman(**base(bg='color4'), update_interval=1800),\r\n  File \"/usr/lib/python3.9/site-packages/libqtile/utils.py\", line 226, in __getattr__\r\n    raise AttributeError\r\nAttributeError\r\n\r\nDuring handling of the above exception, another exception occurred:\r\n\r\nTraceback (most recent call last):\r\n  File \"/usr/lib/python3.9/site-packages/libqtile/core/manager.py\", line 104, in load_config\r\n    self.config.load()\r\n  File \"/usr/lib/python3.9/site-packages/libqtile/confreader.py\", line 108, in load\r\n    raise ConfigError(tb)\r\nlibqtile.confreader.ConfigError: Traceback (most recent call last):\r\n  File \"/usr/lib/python3.9/site-packages/libqtile/confreader.py\", line 101, in load\r\n    config = __import__(name)  # noqa: F811\r\n  File \"/home/sailentk/.config/qtile/config.py\", line 9, in <module>\r\n    from settings.widgets import widget_defaults, extension_defaults\r\n  File \"/home/sailentk/.config/qtile/settings/widgets.py\", line 64, in <module>\r\n    widget.Pacman(**base(bg='color4'), update_interval=1800),\r\n  File \"/usr/lib/python3.9/site-packages/libqtile/utils.py\", line 226, in __getattr__\r\n    raise AttributeError\r\nAttributeError\r\n```\n", "before_files": [{"content": "# Copyright (c) 2021, Tycho Andersen. All rights reserved.\n#\n# Permission is hereby granted, free of charge, to any person obtaining a copy\n# of this software and associated documentation files (the \"Software\"), to deal\n# in the Software without restriction, including without limitation the rights\n# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n# copies of the Software, and to permit persons to whom the Software is\n# furnished to do so, subject to the following conditions:\n#\n# The above copyright notice and this permission notice shall be included in\n# all copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nimport os\nimport os.path\nimport shutil\nimport sys\n\nBACKUP_SUFFIX = \".migrate.bak\"\n\ntry:\n    import bowler\nexcept ImportError:\n    pass\n\n\ndef rename_hook(config, fro, to):\n    # could match on dotted_name< 'hook' '.' 'subscribe' '.' '{name}' >\n    # but the replacement gets more complicated...\n    selector = \"'{name}'\".format(name=fro)\n    q = bowler.Query(config).select_pattern(selector)\n    q.current.kwargs[\"name\"] = fro\n    return q.rename(to)\n\n\ndef client_name_updated(config):\n    \"\"\" Rename window_name_change -> client_name_updated\"\"\"\n    return rename_hook(config, \"window_name_change\", \"client_name_updated\")\n\n\ndef tile_master_windows_rename(config):\n    return (\n        bowler.Query(config)\n        .select_function(\"Tile\")\n        .modify_argument(\"masterWindows\", \"master_length\")\n    )\n\n\ndef threaded_poll_text_rename(config):\n    return (\n        bowler.Query(config)\n        .select_class(\"ThreadedPollText\")\n        .rename(\"ThreadPoolText\")\n    )\n\n\nMIGRATIONS = [\n    client_name_updated,\n    tile_master_windows_rename,\n    threaded_poll_text_rename,\n]\n\n\nMODULE_RENAMES = [\n    (\"libqtile.command_graph\", \"libqtile.command.graph\"),\n    (\"libqtile.command_client\", \"libqtile.command.client\"),\n    (\"libqtile.command_interface\", \"libqtile.command.interface\"),\n    (\"libqtile.command_object\", \"libqtile.command.object\"),\n]\n\nfor (fro, to) in MODULE_RENAMES:\n    def f(config, fro=fro, to=to):\n        return (\n            bowler.Query(config)\n            .select_module(fro)\n            .rename(to)\n        )\n    MIGRATIONS.append(f)\n\n\ndef do_migrate(args):\n    if \"bowler\" not in sys.modules:\n        print(\"bowler can't be found, not migrating config file\")\n        print(\"install it and try again\")\n        sys.exit(1)\n\n    shutil.copyfile(args.config, args.config+BACKUP_SUFFIX)\n\n    for m in MIGRATIONS:\n        m(args.config).execute(interactive=args.interactive, write=True)\n\n\ndef add_subcommand(subparsers):\n    parser = subparsers.add_parser(\n        \"migrate\", help=\"Migrate a configuration file to the current API\"\n    )\n    parser.add_argument(\n        \"-c\",\n        \"--config\",\n        action=\"store\",\n        default=os.path.expanduser(\n            os.path.join(os.getenv(\"XDG_CONFIG_HOME\", \"~/.config\"), \"qtile\", \"config.py\")\n        ),\n        help=\"Use the specified configuration file\",\n    )\n    parser.add_argument(\n        \"--interactive\",\n        action=\"store_true\",\n        help=\"Interactively apply diff (similar to git add -p)\",\n    )\n    parser.set_defaults(func=do_migrate)\n", "path": "libqtile/scripts/migrate.py"}], "after_files": [{"content": "# Copyright (c) 2021, Tycho Andersen. All rights reserved.\n#\n# Permission is hereby granted, free of charge, to any person obtaining a copy\n# of this software and associated documentation files (the \"Software\"), to deal\n# in the Software without restriction, including without limitation the rights\n# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n# copies of the Software, and to permit persons to whom the Software is\n# furnished to do so, subject to the following conditions:\n#\n# The above copyright notice and this permission notice shall be included in\n# all copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nimport os\nimport os.path\nimport shutil\nimport sys\n\nBACKUP_SUFFIX = \".migrate.bak\"\n\ntry:\n    import bowler\nexcept ImportError:\n    pass\n\n\ndef rename_hook(config, fro, to):\n    # could match on dotted_name< 'hook' '.' 'subscribe' '.' '{name}' >\n    # but the replacement gets more complicated...\n    selector = \"'{name}'\".format(name=fro)\n    q = bowler.Query(config).select_pattern(selector)\n    q.current.kwargs[\"name\"] = fro\n    return q.rename(to)\n\n\ndef client_name_updated(config):\n    \"\"\" Rename window_name_change -> client_name_updated\"\"\"\n    return rename_hook(config, \"window_name_change\", \"client_name_updated\")\n\n\ndef tile_master_windows_rename(config):\n    return (\n        bowler.Query(config)\n        .select_function(\"Tile\")\n        .modify_argument(\"masterWindows\", \"master_length\")\n    )\n\n\ndef threaded_poll_text_rename(config):\n    return (\n        bowler.Query(config)\n        .select_class(\"ThreadedPollText\")\n        .rename(\"ThreadPoolText\")\n    )\n\n\ndef pacman_to_checkupdates(config):\n    return (\n        bowler.Query(config)\n        .select_class(\"Pacman\")\n        .rename(\"CheckUpdates\")\n    )\n\n\nMIGRATIONS = [\n    client_name_updated,\n    tile_master_windows_rename,\n    threaded_poll_text_rename,\n    pacman_to_checkupdates,\n]\n\n\nMODULE_RENAMES = [\n    (\"libqtile.command_graph\", \"libqtile.command.graph\"),\n    (\"libqtile.command_client\", \"libqtile.command.client\"),\n    (\"libqtile.command_interface\", \"libqtile.command.interface\"),\n    (\"libqtile.command_object\", \"libqtile.command.object\"),\n]\n\nfor (fro, to) in MODULE_RENAMES:\n    def f(config, fro=fro, to=to):\n        return (\n            bowler.Query(config)\n            .select_module(fro)\n            .rename(to)\n        )\n    MIGRATIONS.append(f)\n\n\ndef do_migrate(args):\n    if \"bowler\" not in sys.modules:\n        print(\"bowler can't be found, not migrating config file\")\n        print(\"install it and try again\")\n        sys.exit(1)\n\n    shutil.copyfile(args.config, args.config+BACKUP_SUFFIX)\n\n    for m in MIGRATIONS:\n        m(args.config).execute(interactive=args.interactive, write=True)\n\n\ndef add_subcommand(subparsers):\n    parser = subparsers.add_parser(\n        \"migrate\", help=\"Migrate a configuration file to the current API\"\n    )\n    parser.add_argument(\n        \"-c\",\n        \"--config\",\n        action=\"store\",\n        default=os.path.expanduser(\n            os.path.join(os.getenv(\"XDG_CONFIG_HOME\", \"~/.config\"), \"qtile\", \"config.py\")\n        ),\n        help=\"Use the specified configuration file\",\n    )\n    parser.add_argument(\n        \"--interactive\",\n        action=\"store_true\",\n        help=\"Interactively apply diff (similar to git add -p)\",\n    )\n    parser.set_defaults(func=do_migrate)\n", "path": "libqtile/scripts/migrate.py"}]}