onuratakan / gpt-computer-assistant

gpt-4o for windows, macos and linux
MIT License
4.94k stars 466 forks source link

Not working with Mac OS #10

Open kellyzxiaowei opened 1 month ago

onuratakan commented 1 month ago

Hi, can you share a screen shot. Actualy i know there is some problems caused by pyqt5 but it can be fixed.

kellyzxiaowei commented 1 month ago
image
onuratakan commented 1 month ago

@kellyzxiaowei I just made fix. Can you try again.

kellyzxiaowei commented 1 month ago

@kellyzxiaowei I just made fix. Can you try again.

(venv) zxw@VdeMacBook-Pro gpt-computer-assistant % computerassistant Profile: None [02:14:06] Upsonic active on_prem.py:130 Error: Remote is down Traceback (most recent call last): File "/Users/zxw/AITOOL/gpt-computer-assistant/venv/lib/python3.11/site-packages/upsonic/remote/on_prem.py", line 1422, in langchain the_tool = tool(the_function) ^^^^^^^^^^^^^^^^^^ File "/Users/zxw/AITOOL/gpt-computer-assistant/venv/lib/python3.11/site-packages/langchain_core/tools.py", line 960, in tool return _make_with_name(args[0].name)(args[0]) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/zxw/AITOOL/gpt-computer-assistant/venv/lib/python3.11/site-packages/langchain_core/tools.py", line 925, in _make_tool return StructuredTool.from_function( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/zxw/AITOOL/gpt-computer-assistant/venv/lib/python3.11/site-packages/langchain_core/tools.py", line 836, in fromfunction description = textwrap.dedent(description_).strip() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/homebrew/Cellar/python@3.11/3.11.9/Frameworks/Python.framework/Versions/3.11/lib/python3.11/textwrap.py", line 435, in dedent text = _whitespace_only_re.sub('', text) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ TypeError: expected string or bytes-like object, got 'list'

Traceback (most recent call last): File "/Users/zxw/AITOOL/gpt-computer-assistant/venv/bin/computerassistant", line 8, in sys.exit(start()) ^^^^^^^ File "/Users/zxw/AITOOL/gpt-computer-assistant/venv/lib/python3.11/site-packages/gpt_computer_assistant/start.py", line 19, in start from .gpt_computer_assistant import QApplication, MainWindow, sys File "/Users/zxw/AITOOL/gpt-computer-assistant/venv/lib/python3.11/site-packages/gpt_computer_assistant/gpt_computer_assistant.py", line 1, in from .agent.chat_history import File "/Users/zxw/AITOOL/gpt-computer-assistant/venv/lib/python3.11/site-packages/gpt_computer_assistant/agent/init.py", line 2, in from .assistant import File "/Users/zxw/AITOOL/gpt-computer-assistant/venv/lib/python3.11/site-packages/gpt_computer_assistant/agent/assistant.py", line 5, in from ..screen.shot import * File "/Users/zxw/AITOOL/gpt-computer-assistant/venv/lib/python3.11/site-packages/gpt_computer_assistant/screen/shot.py", line 3, in import pyautogui File "/Users/zxw/AITOOL/gpt-computer-assistant/venv/lib/python3.11/site-packages/pyautogui/init.py", line 246, in import mouseinfo File "/Users/zxw/AITOOL/gpt-computer-assistant/venv/lib/python3.11/site-packages/mouseinfo/init.py", line 100, in from rubicon.objc import ObjCClass, CGPoint File "/Users/zxw/AITOOL/gpt-computer-assistant/venv/lib/python3.11/site-packages/rubicon/objc/init.py", line 33, in from . import api, collections, runtime, types File "/Users/zxw/AITOOL/gpt-computer-assistant/venv/lib/python3.11/site-packages/rubicon/objc/api.py", line 29, in from .runtime import ( File "/Users/zxw/AITOOL/gpt-computer-assistant/venv/lib/python3.11/site-packages/rubicon/objc/runtime.py", line 460, in libobjc.objc_msgSendSuper_stret.restype = None ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/homebrew/Cellar/python@3.11/3.11.9/Frameworks/Python.framework/Versions/3.11/lib/python3.11/ctypes/init.py", line 389, in getattr func = self.getitem(name) ^^^^^^^^^^^^^^^^^^^^^^ File "/opt/homebrew/Cellar/python@3.11/3.11.9/Frameworks/Python.framework/Versions/3.11/lib/python3.11/ctypes/init.py", line 394, in getitem func = self._FuncPtr((name_or_ordinal, self)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AttributeError: dlsym(0x31a437110, objc_msgSendSuper_stret): symbol not found

Can not working.

onuratakan commented 1 month ago

Hi are you working with intel macos?

HarbingerOfFire commented 1 month ago

Looking at it, it seems to fail when importing Rubicon objective-C for PyAutoGUI. The code it is failing on is architecture specific, and it only works on 32-bit or ARM processors. You can check the architecture in the place shown below. image Apple M1 and M2 work well, and so do intel x86. However, if you have an intel x64, this is likely an error with rubicon not correctly identifying architecture.

onuratakan commented 1 month ago

Looking at it, it seems to fail when importing Rubicon objective-C for PyAutoGUI. The code it is failing on is architecture specific, and it only works on 32-bit or ARM processors. You can check the architecture in the place shown below. image Apple M1 and M2 work well, and so do intel x86. However, if you have an intel x64, this is likely an error with rubicon not correctly identifying architecture.

Oh thanks for detailed explaination. Do you know any solution for this or writing another gui for intel macos?

HarbingerOfFire commented 1 month ago

I would say the only alternative I know is to replace the use of pyautogui for mac environments with an Objective-C bridge and do things manually. There may be a little bit of a learning curve, but I suggest pyobjc because it is native to MacOS, and can be used to do much of the same things when paired with Quartz.

gokborayilmaz commented 1 month ago

Okey, we will work on it.