Skip to content

AttributeError: 'NoneType' object has no attribute 'capture_as_image' #232

@JackWong007

Description

@JackWong007

ENV :
UFO:2.0.0
PYTHON:3.10.10

D:\data\UFO2>python -m ufo --task helloufo004

Welcome to use UFO🛸, A UI-focused Agent for Windows OS Interaction.


| | | || | / _
| | | || |
| | | |
| |
| || | | || |
_
/ |_| __/

Please enter your request to be completed🛸:
在打开的记事本中,输入Hello UFO

Round 1, Step 1, HostAgent: Analyzing the user intent and decomposing the request...
Observations👀: The current screenshot shows Visual Studio Code with several files open, a Command Prompt window running a Python script, and a Notepad window open with no text yet. Notepad is in focus and waiting for input.
Thoughts💡: The user's request is to input 'Hello UFO' into the opened Notepad document. This task can be completed entirely within the Notepad application, as it is currently open and ready to receive text input.
Plans📚: (1) Input 'Hello UFO' into the opened Notepad document.
Next Selected application📲: 无标题 - 记事本
Messages to AppAgent📩:
Status📊: ASSIGN
Comment💬: I will instruct an AppAgent to enter 'Hello UFO' into the currently open Notepad document, completing the user's request.
Round 1, Step 2, AppAgent: Completing the subtask [Input 'Hello UFO' into the opened Notepad document.] on application [].


Error Occurs at capture_screenshot
Traceback (most recent call last):
File "D:\data\UFO2\ufo\agents\processors\basic.py", line 192, in wrapper
func(self, *args, **kwargs)
File "D:\data\UFO2\ufo\agents\processors\basic.py", line 174, in wrapper
result = func(self, *args, **kwargs)
File "D:\data\UFO2\ufo\agents\processors\app_agent_processor.py", line 282, in capture_screenshot
self.photographer.capture_app_window_screenshot(
File "D:\data\UFO2\ufo\automator\ui_control\screenshot.py", line 528, in capture_app_window_screenshot
return screenshot.capture(save_path, scalar)
File "D:\data\UFO2\ufo\automator\ui_control\screenshot.py", line 79, in capture
screenshot = self.control.capture_as_image()
AttributeError: 'NoneType' object has no attribute 'capture_as_image'


Markdown file saved to logs/helloufo004//output.md.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions