Skip to content

docs: Live Patching #1775

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

No activity

Activity on this issue will appear here.

Activity

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

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