ra1nty / DXcam

A Python high-performance screen capture library for Windows using Desktop Duplication API
MIT License
457 stars 67 forks source link

ctypes.WinError() OSError: [WinError 87] The parameter is incorrect. in typer.py #69

Open karlh5926 opened 1 year ago

karlh5926 commented 1 year ago

I'm getting the following error when running the example code snippet

camera = dxcam.create()
camera.start(target_fps=60)
frame = camera.get_latest_frame()
$ python main.py
Exception in thread DXCamera:
Traceback (most recent call last):
  File "O:\Program Files\Python311\Lib\threading.py", line 1038, in _bootstrap_inner
    self.run()
  File "O:\Program Files\Python311\Lib\threading.py", line 975, in run
    self._target(*self._args, **self._kwargs)
  File "O:\Program Files\Python311\Lib\site-packages\dxcam\dxcam.py", line 162, in __capture
    set_periodic_timer(self.__timer_handle, period_ms)
  File "O:\Program Files\Python311\Lib\site-packages\dxcam\util\timer.py", line 34, in set_periodic_timer
    raise ctypes.WinError()
OSError: [WinError 87] The parameter is incorrect.
AI-M-BOT commented 11 months ago

Which version of windows/python