Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions autoagent/environment/browser_env.py
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ def _click_id(bid: str, button: Literal["left", "middle", "right"] = "left"):
# 等待页面完全加载
# 增加等待时间,确保页面完全加载
page.wait_for_load_state("networkidle", timeout=3000)
except:
except Exception:
pass

return
Expand Down Expand Up @@ -322,7 +322,7 @@ def tryToClickChallenge(this_page):
(!document.body.textContent.includes("请完成以下操作,验证您是真人。") &&
!document.body.textContent.includes("Verify you are human by completing the action below."))
""", timeout=20000)
except:
except Exception:
print("等待验证超时")

# 检查是否仍在验证页面
Expand Down
2 changes: 1 addition & 1 deletion autoagent/environment/local_env.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ def _find_conda_sh(self) -> str:
conda_sh = Path(base_path) / "etc" / "profile.d" / "conda.sh"
if conda_sh.exists():
return str(conda_sh)
except:
except (subprocess.SubprocessError, OSError):
pass

# 3. If all fails, return None and handle in run_command
Expand Down
2 changes: 1 addition & 1 deletion autoagent/registry.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ def wrapped_func(*args, **kwargs):
wrapped_func = func
try:
file_path = os.path.abspath(inspect.getfile(func))
except:
except (TypeError, OSError):
file_path = "Unknown"

# 获取函数信息
Expand Down