Skip to content

custom chute deploy: Type is not JSON serializable: ModelMetaclass#62

Open
tripathiarpan20 wants to merge 1 commit intochutesai:mainfrom
tripathiarpan20:feature/chute-deploy-debug
Open

custom chute deploy: Type is not JSON serializable: ModelMetaclass#62
tripathiarpan20 wants to merge 1 commit intochutesai:mainfrom
tripathiarpan20:feature/chute-deploy-debug

Conversation

@tripathiarpan20
Copy link
Contributor

Follow up to issue #60

chutes deploy validator_chute:chute --accept-fee
2026-03-16 09:45:26.228 | INFO     | chutes.config:get_config:55 - Loading chutes config from /root/.chutes/config.ini...
You are about to upload /root/prototype_chutes/vidaio-subnet/prototype/validator_chute.py and deploy secure-validator, confirm? (y/n) y
╭─────────────────────────────────────────────────────────────────────────── Traceback (most recent call last) ────────────────────────────────────────────────────────────────────────────╮
│ /root/prototype_chutes/vidaio-subnet/chutes/chutes/entrypoint/deploy.py:219 in deploy_chute                                                                                              │
│                                                                                                                                                                                          │
│   216 │   │   │   accept_fee=accept_fee,                                                                                                                                                 │
│   217 │   │   )                                                                                                                                                                          │
│   218 │                                                                                                                                                                                  │
│ ❱ 219 │   return asyncio.run(_deploy_chute())                                                                                                                                            │
│   220                                                                                                                                                                                    │
│                                                                                                                                                                                          │
│ /usr/lib/python3.12/asyncio/runners.py:194 in run                                                                                                                                        │
│                                                                                                                                                                                          │
│   191 │   │   │   "asyncio.run() cannot be called from a running event loop")                                                                                                            │
│   192 │                                                                                                                                                                                  │
│   193 │   with Runner(debug=debug, loop_factory=loop_factory) as runner:                                                                                                                 │
│ ❱ 194 │   │   return runner.run(main)                                                                                                                                                    │
│   195                                                                                                                                                                                    │
│   196                                                                                                                                                                                    │
│   197 def _cancel_all_tasks(loop):                                                                                                                                                       │
│                                                                                                                                                                                          │
│ /usr/lib/python3.12/asyncio/runners.py:118 in run                                                                                                                                        │
│                                                                                                                                                                                          │
│   115 │   │                                                                                                                                                                              │
│   116 │   │   self._interrupt_count = 0                                                                                                                                                  │
│   117 │   │   try:                                                                                                                                                                       │
│ ❱ 118 │   │   │   return self._loop.run_until_complete(task)                                                                                                                             │
│   119 │   │   except exceptions.CancelledError:                                                                                                                                          │
│   120 │   │   │   if self._interrupt_count > 0:                                                                                                                                          │
│   121 │   │   │   │   uncancel = getattr(task, "uncancel", None)                                                                                                                         │
│                                                                                                                                                                                          │
│ /usr/lib/python3.12/asyncio/base_events.py:687 in run_until_complete                                                                                                                     │
│                                                                                                                                                                                          │
│    684 │   │   if not future.done():                                                                                                                                                     │
│    685 │   │   │   raise RuntimeError('Event loop stopped before Future completed.')                                                                                                     │
│    686 │   │                                                                                                                                                                             │
│ ❱  687 │   │   return future.result()                                                                                                                                                    │
│    688 │                                                                                                                                                                                 │
│    689 │   def stop(self):                                                                                                                                                               │
│    690 │   │   """Stop running the event loop.                                                                                                                                           │
│                                                                                                                                                                                          │
│ /root/prototype_chutes/vidaio-subnet/chutes/chutes/entrypoint/deploy.py:210 in _deploy_chute                                                                                             │
│                                                                                                                                                                                          │
│   207 │   │   │   logo_id = await upload_logo(logo)                                                                                                                                      │
│   208 │   │                                                                                                                                                                              │
│   209 │   │   # Deploy!                                                                                                                                                                  │
│ ❱ 210 │   │   return await _deploy(                                                                                                                                                      │
│   211 │   │   │   chute_ref_str,                                                                                                                                                         │
│   212 │   │   │   module,                                                                                                                                                                │
│   213 │   │   │   chute,                                                                                                                                                                 │
│                                                                                                                                                                                          │
│ /root/prototype_chutes/vidaio-subnet/chutes/chutes/entrypoint/deploy.py:93 in _deploy                                                                                                    │
│                                                                                                                                                                                          │
│    90 │   │   ],                                                                                                                                                                         │
│    91 │   }                                                                                                                                                                              │
│    92 │                                                                                                                                                                                  │
│ ❱  93 │   headers, request_string = sign_request(request_body)                                                                                                                           │
│    94 │   headers["X-Chutes-Version"] = current_version                                                                                                                                  │
│    95 │   async with aiohttp.ClientSession(base_url=config.generic.api_base_url) as session:                                                                                             │
│    96 │   │   async with session.post(                                                                                                                                                   │
│                                                                                                                                                                                          │
│ /root/prototype_chutes/vidaio-subnet/chutes/chutes/util/auth.py:54 in sign_request                                                                                                       │
│                                                                                                                                                                                          │
│   51 │   if payload is not None:                                                                                                                                                         │
│   52 │   │   if isinstance(payload, dict):                                                                                                                                               │
│   53 │   │   │   headers["Content-Type"] = "application/json"                                                                                                                            │
│ ❱ 54 │   │   │   payload_string = json.dumps(payload)                                                                                                                                    │
│   55 │   │   else:                                                                                                                                                                       │
│   56 │   │   │   payload_string = payload                                                                                                                                                │
│   57 │   │   signature_string = get_signing_message(                                                                                                                                     │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
TypeError: Type is not JSON serializable: ModelMetaclass

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant