`print()` statements causing my custom tool to hang
Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
mkhtran
9 - Comet
09-06-2023
09:55 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
I'm not sure the cause of it, but I've noticed my custom tool will hang at seemingly inconsistent times, and it seems to be because of `print()` statements.
class MyTool(PluginV2):
def __init__(self, provider: AMPProviderV2):
self.name = "My Tool"
self.provider = provider
for i in range(0, 1000):
text = f"{i} - Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua."
print(text)
self.provider.io.info(text)
With this constructor, my tool hangs after the 63rd `print()`, impacting the entire workflow.
But commenting out the `print()` statement will continue without issues. What's the cause of this issue?
Labels:
- Labels:
-
Custom Tools
-
Python
0 REPLIES 0
![](/skins/images/CA34AF9445BCCAABC1C7EB3993FCDD38/responsive_peak/images/icon_anonymous_message.png)