onuratakan / gpt-computer-assistant

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

After startup, a window appears then report an error message, and the window close itself. #110

Closed jingrongx closed 3 weeks ago

jingrongx commented 3 weeks ago

After startup, a window appears then an error message appears, and the window close itself.

`C:\Windows\System32>computerassistant [14:06:52] Upsonic active on_prem.py:130 WARNING: pip is being invoked by an old script wrapper. This will fail in a future version of pip. Please see https://github.com/pypa/pip/issues/5599 for advice on fixing the underlying issue. To avoid this problem you can invoke Python with '-m pip' instead of running pip directly. Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple Requirement already satisfied: AppOpener==1.7 in c:\users\test\appdata\local\programs\python\python311\lib\site-packages (1.7) Requirement already satisfied: wheel in c:\users\test\appdata\local\programs\python\python311\lib\site-packages (from AppOpener==1.7) (0.43.0) Requirement already satisfied: psutil in c:\users\test\appdata\local\programs\python\python311\lib\site-packages (from AppOpener==1.7) (5.9.6) Requirement already satisfied: pywin32 in c:\users\test\appdata\local\programs\python\python311\lib\site-packages (from AppOpener==1.7) (306) Requirement already satisfied: regex in c:\users\test\appdata\local\programs\python\python311\lib\site-packages (from AppOpener==1.7) (2023.10.3) WARNING: pip is being invoked by an old script wrapper. This will fail in a future version of pip. Please see https://github.com/pypa/pip/issues/5599 for advice on fixing the underlying issue. To avoid this problem you can invoke Python with '-m pip' instead of running pip directly. Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple Requirement already satisfied: AppOpener==1.7 in c:\users\test\appdata\local\programs\python\python311\lib\site-packages (1.7) Requirement already satisfied: wheel in c:\users\test\appdata\local\programs\python\python311\lib\site-packages (from AppOpener==1.7) (0.43.0) Requirement already satisfied: psutil in c:\users\test\appdata\local\programs\python\python311\lib\site-packages (from AppOpener==1.7) (5.9.6) Requirement already satisfied: pywin32 in c:\users\test\appdata\local\programs\python\python311\lib\site-packages (from AppOpener==1.7) (306) Requirement already satisfied: regex in c:\users\test\appdata\local\programs\python\python311\lib\site-packages (from AppOpener==1.7) (2023.10.3) WARNING: pip is being invoked by an old script wrapper. This will fail in a future version of pip. Please see https://github.com/pypa/pip/issues/5599 for advice on fixing the underlying issue. To avoid this problem you can invoke Python with '-m pip' instead of running pip directly. Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple Requirement already satisfied: duckduckgo-search==5.3.0 in c:\users\test\appdata\local\programs\python\python311\lib\site-packages (5.3.0) Requirement already satisfied: click>=8.1.7 in c:\users\test\appdata\local\programs\python\python311\lib\site-packages (from duckduckgo-search==5.3.0) (8.1.7) Requirement already satisfied: curl-cffi>=0.6.2 in c:\users\test\appdata\local\programs\python\python311\lib\site-packages (from duckduckgo-search==5.3.0) (0.6.4) Requirement already satisfied: orjson>=3.10.0 in c:\users\test\appdata\local\programs\python\python311\lib\site-packages (from duckduckgo-search==5.3.0) (3.10.3) Requirement already satisfied: colorama in c:\users\test\appdata\local\programs\python\python311\lib\site-packages (from click>=8.1.7->duckduckgo-search==5.3.0) (0.4.6) Requirement already satisfied: cffi>=1.12.0 in c:\users\test\appdata\local\programs\python\python311\lib\site-packages (from curl-cffi>=0.6.2->duckduckgo-search==5.3.0) (1.15.1) Requirement already satisfied: certifi>=2024.2.2 in c:\users\test\appdata\local\programs\python\python311\lib\site-packages (from curl-cffi>=0.6.2->duckduckgo-search==5.3.0) (2024.6.2) Requirement already satisfied: pycparser in c:\users\test\appdata\local\programs\python\python311\lib\site-packages (from cffi>=1.12.0->curl-cffi>=0.6.2->duckduckgo-search==5.3.0) (2.21) Profile: None pygame 2.5.2 (SDL 2.28.3, Python 3.11.0) Hello from the pygame community. https://www.pygame.org/contribute.html Imported all libraries Loading font C:\Users\test\AppData\Local\Programs\Python\Python311\Lib\site-packages\gpt_computer_assistant\utils\media\SF-Pro-Text-Bold.otf QWidget::setLayout: Attempting to set QLayout "" on MainWindow "", which already has a layout Traceback (most recent call last): File "C:\Users\test\AppData\Local\Programs\Python\Python311\Lib\site-packages\gpt_computer_assistant\gpt_computer_assistant.py", line 394, in paintEvent if not self.should_paint: ^^^^^^^^^^^^^^^^^ AttributeError: 'MainWindow' object has no attribute 'should_paint'

C:\Windows\System32>`

jingrongx commented 3 weeks ago

Work around `def paintEvent(self, event): if not hasattr(self, 'should_paint'): self.should_paint = False if not self.should_paint: return

`

Mideky-hub commented 3 weeks ago

see : #112