NiiightmareXD / windows-capture

Fastest Windows Screen Capture Library For Rust And Python 🔥
MIT License
235 stars 35 forks source link

[BUG 🪲] [Python] Capture Session Threw An Exception -> Frame handler error #101

Open zipslide opened 2 weeks ago

zipslide commented 2 weeks ago

Describe the bug 🐛

Running the example, that you gave us. I'm using a fresh venv.

(venv) PS C:\Users\test\win_cap> python wincap.py
Traceback (most recent call last):
  File "C:\Users\test\win_cap\wincap.py", line 31, in <module>
    capture.start()
  File "C:\Users\test\win_cap\venv\Lib\site-packages\windows_capture\__init__.py", line 207, in start
    self.capture.start()
Exception: Capture Session Threw An Exception -> Frame handler error: Frame Process Error: Windows API error: The parameter is incorrect. (0x80070057)

OS 🤖 Windows 11 Home, 23H2 (latest as of 11/10/24)

Additional Context

Python 3.11.9

Package Version


numpy 2.1.3 opencv-python 4.10.0.84 pip 24.0 setuptools 65.5.0 windows-capture 1.4.0

Snoogens101 commented 2 weeks ago

Seeing the exact same issue. Running the example from Vscode. Windows 11 Home, 23H2 Python 3.12

mycrl commented 2 weeks ago

@Snoogens101 @zipslide Do you have the same problem running the rust example?

Snoogens101 commented 1 week ago

@Snoogens101 @zipslide Do you have the same problem running the rust example?

No, the issue does not exist in Rust, only when using the Python version.

NiiightmareXD commented 1 week ago

@Snoogens101 @zipslide Do you have the same problem running the rust example?

No, the issue does not exist in Rust, only when using the Python version.

Can you try the new version 1.4.2?

Snoogens101 commented 1 week ago

@Snoogens101 @zipslide Do you have the same problem running the rust example?

No, the issue does not exist in Rust, only when using the Python version.

Can you try the new version 1.4.2?

Works! Thank you very much :)