Replies: 1 comment
-
What’s likely happening? Your team code (maybe a version shared with others or integrated somewhere) lacks this custom input override and falls back to the default input() function, which prompts on the console. So, when running the team code, the program asks for input interactively instead of using your predefined/custom function. How to fix this? Make sure the file or module containing the custom input function is available and imported. Example: if your custom function is def custom_input(prompt): ..., then the team code must call this function instead of built-in input(). Override the built-in input() in your code before running. If you want your custom input function to be used transparently:
This way, anywhere in the code that calls input() will get your custom behavior. Ensure that the JSON data source is correctly loaded and used in the team code. If your custom input reads from JSON, the team code needs to load the JSON data before calls to input. Confirm that the "team" environment has all dependencies and files your custom function relies on. Test by printing/logging inside your custom input function to verify it is called in the team code. Summary Your team code doesn’t have the custom input function wired in, so it falls back to default input. You can fix this by importing or defining your custom input function in the team code. Alternatively, override the built-in input() globally to use your custom function. Make sure JSON data is loaded and accessible. Verify all dependencies and imports. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi autogenteam I have one issue that Userproxyagent with custom input function in python flat code which dumps into a json team. That doesnot have the custom input function and when runs it. It asusally asks from Console input. Please resolve it.
Beta Was this translation helpful? Give feedback.
All reactions