Skip to content

docs: Live Patching #1775

Open
Open
@andyad8865

Description

@andyad8865

Page

Live Patching : /Guides/22 Live Patching/

Problem description

If the command is not placed at the bottom of the script, and is placed at the top jurigged will throw and error

Jurigged encountered an error
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/jurigged/codetools.py", line 533, in _process_child_correspondence
    orig.apply_correspondence(
  File "/usr/local/lib/python3.10/site-packages/jurigged/codetools.py", line 744, in apply_correspondence
    new_obj = self.reevaluate(corr.new.node, glb)
  File "/usr/local/lib/python3.10/site-packages/jurigged/codetools.py", line 845, in reevaluate
    raise Exception(
Exception: Cannot find existing object for replacement of 'command_function'.

Suggested changes

indicate in the guide that bot.load_extension("interactions.ext.jurigged") needs to be below your code but above the bot.start() line e.g.

import interactions

bot = interactions.Client()

@interactions.listen()
async def on_startup():
    print("Bot is ready!")

#allow code hot reloading in Python
bot.load_extension("interactions.ext.jurigged")  

bot.start("token")

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy