Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AttributeError: 'AppAgentProcessor' object has no attribute 'update_step'. Did you mean: 'update_cost'? #129

Open
HamzaAsiff opened this issue Oct 27, 2024 · 8 comments

Comments

@HamzaAsiff
Copy link

I tried setting up and running the UFO first time with a basic task of sending an email to a gmail address with a simple question.
UFO does everything as expected until the last step when it asks the user for permission to send the email. That's where I received the error. Full traceback is pasted below:

[Input Required:] UFO🛸 will apply click_input(button='left', double=False) on the [Send] item. Please confirm whether to proceed or not. Please input Y or N.
Y
Traceback (most recent call last):
File "C:\Users\anaconda3\envs\ufo\lib\runpy.py", line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
File "C:\Users\anaconda3\envs\ufo\lib\runpy.py", line 86, in run_code
exec(code, run_globals)
File "C:\Users\code\UFO\ufo_main
.py", line 7, in
ufo.main()
File "C:\Users\code\UFO\ufo\ufo.py", line 56, in main
clients.run_all()
File "C:\Users\code\UFO\ufo\module\client.py", line 28, in run_all
session.run()
File "C:\Users\code\UFO\ufo\module\sessions\session.py", line 103, in run
super().run()
File "C:\Users\code\UFO\ufo\module\basic.py", line 355, in run
round.run()
File "C:\Users\code\UFO\ufo\module\basic.py", line 104, in run
self.agent.handle(self.context)
File "C:\Users\code\UFO\ufo\agents\agent\basic.py", line 224, in handle
self.state.handle(self, context)
File "C:\Users\code\UFO\ufo\agents\states\app_agent_state.py", line 315, in handle
agent.process_resume()
File "C:\Users\code\UFO\ufo\agents\agent\basic.py", line 237, in process_resume
self.processor.resume()
File "C:\Users\code\UFO\ufo\agents\processors\basic.py", line 152, in resume
self.update_step()
AttributeError: 'AppAgentProcessor' object has no attribute 'update_step'. Did you mean: 'update_cost'?

Currently on Windows 11 using Anaconda Virtual Env with python 3.10.15
Also tried python 3.13 but same error.
Any assistance would be appreciated, thanks

@vyokky
Copy link
Contributor

vyokky commented Oct 28, 2024

Hi @HamzaAsiff , thanks for reporting this issue. We have fixed it in our dev version: https://github.com/microsoft/UFO/tree/vyokky/dev
Please have a try and let us know if there is any issue. Thanks!

@HamzaAsiff
Copy link
Author

Hello, thanks for the quick response. I have tried the dev version and it fixed that particular issue so will be closing this issue.
But I have noticed some more issues while executing a request of sending an email:

  1. UFO throws an error while executing the same request which worked previously with no changes in the prompt.
  2. UFO sometimes goes into a loop of executing a same local plan again and again. For example In the user confirmation section to send an email it asked the user to confirm multiple times even after getting the user input the first time.
  3. Safeguard feature doesn't always work. For example in the task of sending an email, in the first session it asked the user to provide confirmation before sending the email. But in another session with a slight change in the prompt it sent the email and asked for confirmation after sending it.

Currently on Windows 11 using Anaconda Virtual Env with python 3.10.15
Also tried python 3.13.

@vyokky
Copy link
Contributor

vyokky commented Oct 28, 2024

@HamzaAsiff What is the error trace it throws you encounter?

@vyokky vyokky reopened this Oct 28, 2024
@HamzaAsiff
Copy link
Author

This is the error traceback when I asked it to analyze and explain the an image. I got the same issue when sending an email which somehow worked the second time with no changes in prompt:

Please enter your request to be completed🛸:
Analyse and explain the RagArchitecture.png image.
Round 1, Step 1, HostAgent: Analyzing the user intent and decomposing the request...
Observations👀: I observe that the RagArchitecture.png image is currently open in the screenshot, indicating that I can analyze its content directly. The Outlook application is also visible, which may be relevant for future tasks, but the current focus is on the image analysis.
Thoughts💡: The user request can be solely completed by analyzing the RagArchitecture.png image. I need to focus on extracting relevant information from this image and providing an explanation based on its content.
Plans📚: (1) Analyze the content of the RagArchitecture.png image and provide an explanation of its elements and structure.
Next Selected application📲: RagArchitecture.png
Messages to AppAgent📩: (1) Carefully examine the image to identify key components and their relationships.
(2) Summarize the findings in a clear and concise manner.
Status📊: CONTINUE
Comment💬: I will now proceed to analyze the RagArchitecture.png image and provide an explanation based on its content.
Opening the required application or file...
Traceback (most recent call last):
File "", line 198, in _run_module_as_main
File "", line 88, in run_code
File "C:\Users\Hamza\OneDrive\Desktop\code\UFO-vyokky-dev\ufo_main
.py", line 7, in
ufo.main()
File "C:\Users\Hamza\OneDrive\Desktop\code\UFO-vyokky-dev\ufo\ufo.py", line 66, in main
clients.run_all()
File "C:\Users\Hamza\OneDrive\Desktop\code\UFO-vyokky-dev\ufo\module\client.py", line 28, in run_all
session.run()
File "C:\Users\Hamza\OneDrive\Desktop\code\UFO-vyokky-dev\ufo\module\sessions\session.py", line 122, in run
super().run()
File "C:\Users\Hamza\OneDrive\Desktop\code\UFO-vyokky-dev\ufo\module\basic.py", line 362, in run
round.run()
File "C:\Users\Hamza\OneDrive\Desktop\code\UFO-vyokky-dev\ufo\module\basic.py", line 104, in run
self.agent.handle(self.context)
File "C:\Users\Hamza\OneDrive\Desktop\code\UFO-vyokky-dev\ufo\agents\agent\basic.py", line 224, in handle
self.state.handle(self, context)
File "C:\Users\Hamza\OneDrive\Desktop\code\UFO-vyokky-dev\ufo\agents\states\host_agent_state.py", line 132, in handle
agent.process(context)
File "C:\Users\Hamza\OneDrive\Desktop\code\UFO-vyokky-dev\ufo\agents\agent\host_agent.py", line 241, in process
self.processor.process()
File "C:\Users\Hamza\OneDrive\Desktop\code\UFO-vyokky-dev\ufo\agents\processors\basic.py", line 122, in process
self.execute_action()
File "C:\Users\Hamza\OneDrive\Desktop\code\UFO-vyokky-dev\ufo\agents\processors\basic.py", line 164, in wrapper
result = func(self, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Hamza\OneDrive\Desktop\code\UFO-vyokky-dev\ufo\agents\processors\host_agent_processor.py", line 169, in execute_action
new_app_window = self.host_agent.app_file_manager(self.app_to_open)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Hamza\OneDrive\Desktop\code\UFO-vyokky-dev\ufo\agents\agent\host_agent.py", line 218, in app_file_manager
results = file_manager.execute_code(app_file_info)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Hamza\OneDrive\Desktop\code\UFO-vyokky-dev\ufo\automator\ui_control\openfile.py", line 50, in execute_code
self.APP = args.get("APP", "")
^^^^^^^^
AttributeError: 'str' object has no attribute 'get'

@vyokky
Copy link
Contributor

vyokky commented Oct 28, 2024

We now fix this error at the same branch, please pull the latest code. For issue 2 and 3, we are working on it. Thanks your report :)

@HamzaAsiff
Copy link
Author

I pulled the latest code and tried it. The errors are resolved now for the queries I tried before.
Regarding the looping issue, I noticed that ufo does manage to create the plan and prepare the content but it loops over at the stage when It has to perform the action part. For example in the email sending part, I noticed that it can understand the image and compose the email content accurately but when it comes to actually select the new email button or when writing in the outlook, that's where it loops over.
I also tried to increase the windows scale up to 150% but that didn't help as well.
Hope this gives more info regarding the issue, thanks.

@Zhang-Henry
Copy link

I have encountered the same problem of looping over the same action. Wish to be solved. Thanks!

@vyokky
Copy link
Contributor

vyokky commented Nov 23, 2024

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

No branches or pull requests

3 participants