Spaces:
Runtime error
Runtime error
Fix: Create DummyAwaitable class to handle any await operation
Browse files
config.py
CHANGED
|
@@ -46,16 +46,25 @@ class DummyClient:
|
|
| 46 |
assistant = DummyClient()
|
| 47 |
|
| 48 |
# Additional placeholders for variables that might be awaited
|
| 49 |
-
RENDYDEV = None
|
| 50 |
running_tasks = []
|
| 51 |
loop = asyncio.get_event_loop()
|
| 52 |
|
| 53 |
# Common variables that might be awaited
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 54 |
async def dummy_awaitable():
|
| 55 |
return None
|
| 56 |
|
| 57 |
-
main =
|
| 58 |
-
initial_building =
|
|
|
|
|
|
|
|
|
|
| 59 |
|
| 60 |
def loaded_cache(file_open=None):
|
| 61 |
with open(file_open, "rb") as f:
|
|
|
|
| 46 |
assistant = DummyClient()
|
| 47 |
|
| 48 |
# Additional placeholders for variables that might be awaited
|
|
|
|
| 49 |
running_tasks = []
|
| 50 |
loop = asyncio.get_event_loop()
|
| 51 |
|
| 52 |
# Common variables that might be awaited
|
| 53 |
+
class DummyAwaitable:
|
| 54 |
+
def __await__(self):
|
| 55 |
+
return iter([])
|
| 56 |
+
|
| 57 |
+
def __call__(self, *args, **kwargs):
|
| 58 |
+
return self
|
| 59 |
+
|
| 60 |
async def dummy_awaitable():
|
| 61 |
return None
|
| 62 |
|
| 63 |
+
main = DummyAwaitable()
|
| 64 |
+
initial_building = DummyAwaitable()
|
| 65 |
+
|
| 66 |
+
# Additional dummy objects that might be awaited
|
| 67 |
+
RENDYDEV = DummyAwaitable()
|
| 68 |
|
| 69 |
def loaded_cache(file_open=None):
|
| 70 |
with open(file_open, "rb") as f:
|