computer-use-ootb-internal 0.0.104__py3-none-any.whl → 0.0.105__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- computer_use_ootb_internal/app_teachmode.py +9 -39
- {computer_use_ootb_internal-0.0.104.dist-info → computer_use_ootb_internal-0.0.105.dist-info}/METADATA +1 -1
- {computer_use_ootb_internal-0.0.104.dist-info → computer_use_ootb_internal-0.0.105.dist-info}/RECORD +5 -5
- {computer_use_ootb_internal-0.0.104.dist-info → computer_use_ootb_internal-0.0.105.dist-info}/WHEEL +0 -0
- {computer_use_ootb_internal-0.0.104.dist-info → computer_use_ootb_internal-0.0.105.dist-info}/entry_points.txt +0 -0
@@ -107,44 +107,17 @@ def prepare_environment(state):
|
|
107
107
|
url = "https://sr.mihoyo.com/cloud/#/"
|
108
108
|
browser_opened = False
|
109
109
|
try:
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
opened_with_subprocess = False
|
118
|
-
for edge_path in edge_paths:
|
119
|
-
if os.path.exists(edge_path):
|
120
|
-
try:
|
121
|
-
print(f"Trying path: {edge_path}")
|
122
|
-
subprocess.Popen([edge_path, url])
|
123
|
-
print(f"Successfully launched Edge with Popen using path: {edge_path}")
|
124
|
-
opened_with_subprocess = True
|
125
|
-
browser_opened = True
|
126
|
-
break # Exit loop once successfully opened
|
127
|
-
except Exception as sub_e:
|
128
|
-
print(f"Failed to launch Edge with Popen using {edge_path}: {sub_e}")
|
129
|
-
else:
|
130
|
-
print(f"Edge path not found: {edge_path}")
|
131
|
-
|
132
|
-
# Fallback to webbrowser.open if subprocess failed
|
133
|
-
if not opened_with_subprocess:
|
134
|
-
print("Subprocess launch failed, falling back to webbrowser.open()...")
|
135
|
-
try:
|
136
|
-
if webbrowser.open(url):
|
137
|
-
print("Successfully opened browser using webbrowser.open() as fallback.")
|
138
|
-
browser_opened = True
|
139
|
-
else:
|
140
|
-
print("webbrowser.open() also failed to indicate success.")
|
141
|
-
except Exception as web_e:
|
142
|
-
print(f"webbrowser.open() fallback failed: {web_e}")
|
110
|
+
# Use only webbrowser.open
|
111
|
+
print(f"Attempting to open {url} using webbrowser.open()...")
|
112
|
+
if webbrowser.open(url):
|
113
|
+
print(f"Successfully requested browser to open {url} via webbrowser.open().")
|
114
|
+
browser_opened = True
|
115
|
+
else:
|
116
|
+
print("webbrowser.open() returned False, indicating potential failure.")
|
143
117
|
|
144
118
|
if not browser_opened:
|
145
|
-
print("ERROR: Failed to
|
146
|
-
#
|
147
|
-
# For now, we'll proceed to the click attempt but it might fail
|
119
|
+
print("ERROR: Failed to confirm browser opening via webbrowser.open().")
|
120
|
+
# Still proceed to click attempt
|
148
121
|
|
149
122
|
# Add pyautogui click after attempting to open the browser
|
150
123
|
print("Proceeding with pyautogui actions...")
|
@@ -171,9 +144,6 @@ def prepare_environment(state):
|
|
171
144
|
# pyautogui.FAILSAFE = True
|
172
145
|
# print("PyAutoGUI failsafe re-enabled.")
|
173
146
|
|
174
|
-
except FileNotFoundError:
|
175
|
-
# This specific error might occur if edge_path exists but execution fails
|
176
|
-
print("Error: Could not execute the browser command (FileNotFound). Check permissions or path.")
|
177
147
|
except Exception as e:
|
178
148
|
print(f"Error during environment preparation (browser/click): {e}")
|
179
149
|
finally:
|
{computer_use_ootb_internal-0.0.104.dist-info → computer_use_ootb_internal-0.0.105.dist-info}/RECORD
RENAMED
@@ -1,5 +1,5 @@
|
|
1
1
|
computer_use_ootb_internal/README.md,sha256=FxpW95lyub2iX73ZDfK6ML7SdEKg060H5I6Grub7li4,31
|
2
|
-
computer_use_ootb_internal/app_teachmode.py,sha256=
|
2
|
+
computer_use_ootb_internal/app_teachmode.py,sha256=oW9s33AdSe6FxSBZxS7z4S1wLdCYGdPNw5qqpK70GKg,19059
|
3
3
|
computer_use_ootb_internal/app_teachmode_gradio.py,sha256=zAw-n3s20j1Jr0S4TzXHwllKV6APJ8HEHB1KqBuzriY,7907
|
4
4
|
computer_use_ootb_internal/dependency_check.py,sha256=y8RMEP6RXQzTgU1MS_1piBLtz4J-Hfn9RjUZg59dyvo,1333
|
5
5
|
computer_use_ootb_internal/example_websocket_js.html,sha256=BLYwDExVlgiAX4vXVXW3RuP5KD8FXE4EFXIl54bwF7w,1322
|
@@ -38,7 +38,7 @@ computer_use_ootb_internal/computer_use_demo/tools/computer_marbot.py,sha256=zZu
|
|
38
38
|
computer_use_ootb_internal/computer_use_demo/tools/edit.py,sha256=b0PwUitxckHCQqFP3ZwlthWdqNkn7WETeTHeB6-o98c,11486
|
39
39
|
computer_use_ootb_internal/computer_use_demo/tools/run.py,sha256=xhXdnBK1di9muaO44CEirL9hpGy3NmKbjfMpyeVmn8Y,1595
|
40
40
|
computer_use_ootb_internal/computer_use_demo/tools/screen_capture.py,sha256=L8qfvtUkPPQGt92N-2Zfw5ZTDBzLsDps39uMnX3_uSA,6857
|
41
|
-
computer_use_ootb_internal-0.0.
|
42
|
-
computer_use_ootb_internal-0.0.
|
43
|
-
computer_use_ootb_internal-0.0.
|
44
|
-
computer_use_ootb_internal-0.0.
|
41
|
+
computer_use_ootb_internal-0.0.105.dist-info/METADATA,sha256=s1CzMYcZD_3G85jKy09Y9jeG7lharUA0EO1tKTEWANY,937
|
42
|
+
computer_use_ootb_internal-0.0.105.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
43
|
+
computer_use_ootb_internal-0.0.105.dist-info/entry_points.txt,sha256=-AbmawU7IRQuDZihgVMVDrFoY4E6rnXYOUB-5vSeBKs,93
|
44
|
+
computer_use_ootb_internal-0.0.105.dist-info/RECORD,,
|
{computer_use_ootb_internal-0.0.104.dist-info → computer_use_ootb_internal-0.0.105.dist-info}/WHEEL
RENAMED
File without changes
|
File without changes
|