hardbyte / hardbyte/python-can

pywintypes.error: (87, 'SetWaitableTimer', 'The parameter is incorrect.')

未关闭
#1,695 2 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
bug
主要语言
Python
星标
1.6k
派生
697
PR 合并指标
30 天内没有已合并 PR

描述

### Describe the bug
When attempting to start a periodic signal, get:
pywintypes.error: (87, 'SetWaitableTimer', 'The parameter is incorrect.')

There was something related resolved here, but this issue is still present:
https://github.com/hardbyte/python-can/issues/1654

### To Reproduce
Install a latest version of python-can, including 4.2.2 or 4.3.0.
Create a periodic signal, and attempt to start it.

### Expected behavior
No error observed.

### Additional context

The following error is observed:

OS and version: Windows 10 Version 1809, OS Build 17763.1637
Python version: 3.7 or 3.8
python-can version: 4.2.2 or 4.3.0
python-can interface/s (if applicable): python-ics==908.12

Traceback and logs

```
Traceback (most recent call last):
File "test2.py", line 8, in
bus.send_periodic(msg, period=1000, duration=5000)
File "c:\temp\venv38\lib\site-packages\can\bus.py", line 269, in send_periodic
self._send_periodic_internal(msgs, period, duration, modifier_callback),
File "c:\temp\venv38\lib\site-packages\can\bus.py", line 319, in _send_periodic_internal
task = ThreadBasedCyclicSendTask(
File "c:\temp\venv38\lib\site-packages\can\broadcastmanager.py", line 269, in __init__
self.start()
File "c:\temp\venv38\lib\site-packages\can\broadcastmanager.py", line 285, in start
win32event.SetWaitableTimer(
pywintypes.error: (87, 'SetWaitableTimer', 'The parameter is incorrect.')
```

```python3

import can

with can.Bus() as bus:
msg = can.Message(
arbitration_id=0xC0FFEE, data=[0, 0, 0, 0, 0, 0, 0, 0], is_extended_id=False
)

bus.send_periodic(msg, period=1000, duration=5000)

```

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。