We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
napari  0.4.17 fails with QtPoll error on a virgin install on windows. Works on the nightly build
## 🐛 Bug

<!-- A clear and concise description of what the bug is. -->

## To Reproduce

Steps to reproduce the behavior:

1. I am running the code with Python 3.10.9.
2. Created a new venv to ensure that we don't have any dead dependencies lying around.
3. Ran <b>pip install "napari[pyqt5]" </b> to install the current release version of napari.
4. Attempted to run napari. The code fails with the error stack below. It also fails if I run napari -info. The stack trace is below

<!-- If you have a code sample, error messages, stack traces, please provide it here as well -->

(virginpip) C:\Users\agovi>napari -info
Traceback (most recent call last):
  File "C:\Users\agovi\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 196, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "C:\Users\agovi\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "C:\Users\agovi\.virtualenvs\virginpip\Scripts\napari.exe\__main__.py", line 7, in <module>
  File "C:\Users\agovi\.virtualenvs\virginpip\lib\site-packages\napari\__main__.py", line 561, in main
    _run()
  File "C:\Users\agovi\.virtualenvs\virginpip\lib\site-packages\napari\__main__.py", line 327, in _run
    viewer = Viewer()
  File "C:\Users\agovi\.virtualenvs\virginpip\lib\site-packages\napari\viewer.py", line 67, in __init__
    self._window = Window(self, show=show)
  File "C:\Users\agovi\.virtualenvs\virginpip\lib\site-packages\napari\_qt\qt_main_window.py", line 463, in __init__
    self._qt_window = _QtMainWindow(viewer)
  File "C:\Users\agovi\.virtualenvs\virginpip\lib\site-packages\napari\_qt\qt_main_window.py", line 88, in __init__
    self._qt_viewer = QtViewer(viewer, show_welcome_screen=True)
  File "C:\Users\agovi\.virtualenvs\virginpip\lib\site-packages\napari\_qt\qt_viewer.py", line 269, in __init__
    self._qt_poll = _create_qt_poll(self, self.viewer.camera)
  File "C:\Users\agovi\.virtualenvs\virginpip\lib\site-packages\napari\_qt\qt_viewer.py", line 1254, in _create_qt_poll
    qt_poll = QtPoll(parent)
  File "C:\Users\agovi\.virtualenvs\virginpip\lib\site-packages\napari\_qt\experimental\qt_poll.py", line 55, in __init__
    self.timer.setInterval(POLL_INTERVAL_MS)
TypeError: setInterval(self, int): argument 1 has unexpected type 'float'


## Expected behavior

<!-- A clear and concise description of what you expected to happen. -->
Expected napari to work correctly. This fails with this version of napari. The previous and the current nightly build are working correctly.  
Have a similar problem with other users. Have included requirements.txt file that I generated with this report. 

## Environment

 - Cannot get the napari up to show the napari info above. Have extracted the napari version from the pip requirements.txt file. 

 - Any other relevant information:

## Additional context

<!-- Add any other context about the problem here. -->
This is on a windows machine. 
[requirements.txt](https://github.com/napari/napari/files/10249367/requirements.txt)


--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `napari/_qt/experimental/qt_poll.py`
Content:
```
1 """QtPoll class.
2 
3 Poll visuals or other objects so they can do things even when the
4 mouse/camera are not moving. Usually for just a short period of time.
5 """
6 import time
7 from typing import Optional
8 
9 from qtpy.QtCore import QEvent, QObject, QTimer
10 
11 from napari.utils.events import EmitterGroup
12 
13 # When running a timer we use this interval.
14 POLL_INTERVAL_MS = 16.666  # About 60HZ
15 
16 # If called more often than this we ignore it. Our _on_camera() method can
17 # be called multiple times in on frame. It can get called because the
18 # "center" changed and then the "zoom" changed even if it was really from
19 # the same camera movement.
20 IGNORE_INTERVAL_MS = 10
21 
22 
23 class QtPoll(QObject):
24     """Polls anything once per frame via an event.
25 
26     QtPoll was first created for VispyTiledImageLayer. It polls the visual
27     when the camera moves. However, we also want visuals to keep loading
28     chunks even when the camera stops. We want the visual to finish up
29     anything that was in progress. Before it goes fully idle.
30 
31     QtPoll will poll those visuals using a timer. If the visual says the
32     event was "handled" it means the visual has more work to do. If that
33     happens, QtPoll will continue to poll and draw the visual it until the
34     visual is done with the in-progress work.
35 
36     An analogy is a snow globe. The user moving the camera shakes up the
37     snow globe. We need to keep polling/drawing things until all the snow
38     settles down. Then everything will stay completely still until the
39     camera is moved again, shaking up the globe once more.
40 
41     Parameters
42     ----------
43     parent : QObject
44         Parent Qt object.
45     camera : Camera
46         The viewer's main camera.
47     """
48 
49     def __init__(self, parent: QObject):
50         super().__init__(parent)
51 
52         self.events = EmitterGroup(source=self, poll=None)
53 
54         self.timer = QTimer()
55         self.timer.setInterval(POLL_INTERVAL_MS)
56         self.timer.timeout.connect(self._on_timer)
57         self._interval = IntervalTimer()
58 
59     def on_camera(self) -> None:
60         """Called when camera view changes."""
61         # When the mouse button is down and the camera is being zoomed
62         # or panned, timer events are starved out. So we call poll
63         # explicitly here. It will start the timer if needed so that
64         # polling can continue even after the camera stops moving.
65         self._poll()
66 
67     def wake_up(self) -> None:
68         """Wake up QtPoll so it starts polling."""
69         # Start the timer so that we start polling. We used to poll once
70         # right away here, but it led to crashes. Because we polled during
71         # a paintGL event?
72         if not self.timer.isActive():
73             self.timer.start()
74 
75     def _on_timer(self) -> None:
76         """Called when the timer is running.
77 
78         The timer is running which means someone we are polling still has
79         work to do.
80         """
81         self._poll()
82 
83     def _poll(self) -> None:
84         """Called on camera move or with the timer."""
85 
86         # Between timers and camera and wake_up() we might be called multiple
87         # times in quick succession. Use an IntervalTimer to ignore these
88         # near-duplicate calls.
89         if self._interval.elapsed_ms < IGNORE_INTERVAL_MS:
90             return
91 
92         # Poll all listeners.
93         event = self.events.poll()
94 
95         # Listeners will "handle" the event if they need more polling. If
96         # no one needs polling, then we can stop the timer.
97         if not event.handled:
98             self.timer.stop()
99             return
100 
101         # Someone handled the event, so they want to be polled even if
102         # the mouse doesn't move. So start the timer if needed.
103         if not self.timer.isActive():
104             self.timer.start()
105 
106     def closeEvent(self, _event: QEvent) -> None:
107         """Cleanup and close.
108 
109         Parameters
110         ----------
111         _event : QEvent
112             The close event.
113         """
114         self.timer.stop()
115         self.deleteLater()
116 
117 
118 class IntervalTimer:
119     """Time the interval between subsequent calls to our elapsed property."""
120 
121     def __init__(self):
122         self._last: Optional[float] = None
123 
124     @property
125     def elapsed_ms(self) -> float:
126         """The elapsed time since the last call to this property."""
127         now = time.time()
128         elapsed_seconds = 0 if self._last is None else now - self._last
129         self._last = now
130         return elapsed_seconds * 1000
131
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/napari/_qt/experimental/qt_poll.py b/napari/_qt/experimental/qt_poll.py
--- a/napari/_qt/experimental/qt_poll.py
+++ b/napari/_qt/experimental/qt_poll.py
@@ -11,7 +11,7 @@
 from napari.utils.events import EmitterGroup
 
 # When running a timer we use this interval.
-POLL_INTERVAL_MS = 16.666  # About 60HZ
+POLL_INTERVAL_MS = 16  # About 60HZ, needs to be an int for QTimer setInterval
 
 # If called more often than this we ignore it. Our _on_camera() method can
 # be called multiple times in on frame. It can get called because the

{"golden_diff": "diff --git a/napari/_qt/experimental/qt_poll.py b/napari/_qt/experimental/qt_poll.py\n--- a/napari/_qt/experimental/qt_poll.py\n+++ b/napari/_qt/experimental/qt_poll.py\n@@ -11,7 +11,7 @@\n from napari.utils.events import EmitterGroup\n \n # When running a timer we use this interval.\n-POLL_INTERVAL_MS = 16.666  # About 60HZ\n+POLL_INTERVAL_MS = 16  # About 60HZ, needs to be an int for QTimer setInterval\n \n # If called more often than this we ignore it. Our _on_camera() method can\n # be called multiple times in on frame. It can get called because the\n", "issue": "napari  0.4.17 fails with QtPoll error on a virgin install on windows. Works on the nightly build\n## \ud83d\udc1b Bug\r\n\r\n<!-- A clear and concise description of what the bug is. -->\r\n\r\n## To Reproduce\r\n\r\nSteps to reproduce the behavior:\r\n\r\n1. I am running the code with Python 3.10.9.\r\n2. Created a new venv to ensure that we don't have any dead dependencies lying around.\r\n3. Ran <b>pip install \"napari[pyqt5]\" </b> to install the current release version of napari.\r\n4. Attempted to run napari. The code fails with the error stack below. It also fails if I run napari -info. The stack trace is below\r\n\r\n<!-- If you have a code sample, error messages, stack traces, please provide it here as well -->\r\n\r\n(virginpip) C:\\Users\\agovi>napari -info\r\nTraceback (most recent call last):\r\n  File \"C:\\Users\\agovi\\AppData\\Local\\Programs\\Python\\Python310\\lib\\runpy.py\", line 196, in _run_module_as_main\r\n    return _run_code(code, main_globals, None,\r\n  File \"C:\\Users\\agovi\\AppData\\Local\\Programs\\Python\\Python310\\lib\\runpy.py\", line 86, in _run_code\r\n    exec(code, run_globals)\r\n  File \"C:\\Users\\agovi\\.virtualenvs\\virginpip\\Scripts\\napari.exe\\__main__.py\", line 7, in <module>\r\n  File \"C:\\Users\\agovi\\.virtualenvs\\virginpip\\lib\\site-packages\\napari\\__main__.py\", line 561, in main\r\n    _run()\r\n  File \"C:\\Users\\agovi\\.virtualenvs\\virginpip\\lib\\site-packages\\napari\\__main__.py\", line 327, in _run\r\n    viewer = Viewer()\r\n  File \"C:\\Users\\agovi\\.virtualenvs\\virginpip\\lib\\site-packages\\napari\\viewer.py\", line 67, in __init__\r\n    self._window = Window(self, show=show)\r\n  File \"C:\\Users\\agovi\\.virtualenvs\\virginpip\\lib\\site-packages\\napari\\_qt\\qt_main_window.py\", line 463, in __init__\r\n    self._qt_window = _QtMainWindow(viewer)\r\n  File \"C:\\Users\\agovi\\.virtualenvs\\virginpip\\lib\\site-packages\\napari\\_qt\\qt_main_window.py\", line 88, in __init__\r\n    self._qt_viewer = QtViewer(viewer, show_welcome_screen=True)\r\n  File \"C:\\Users\\agovi\\.virtualenvs\\virginpip\\lib\\site-packages\\napari\\_qt\\qt_viewer.py\", line 269, in __init__\r\n    self._qt_poll = _create_qt_poll(self, self.viewer.camera)\r\n  File \"C:\\Users\\agovi\\.virtualenvs\\virginpip\\lib\\site-packages\\napari\\_qt\\qt_viewer.py\", line 1254, in _create_qt_poll\r\n    qt_poll = QtPoll(parent)\r\n  File \"C:\\Users\\agovi\\.virtualenvs\\virginpip\\lib\\site-packages\\napari\\_qt\\experimental\\qt_poll.py\", line 55, in __init__\r\n    self.timer.setInterval(POLL_INTERVAL_MS)\r\nTypeError: setInterval(self, int): argument 1 has unexpected type 'float'\r\n\r\n\r\n## Expected behavior\r\n\r\n<!-- A clear and concise description of what you expected to happen. -->\r\nExpected napari to work correctly. This fails with this version of napari. The previous and the current nightly build are working correctly.  \r\nHave a similar problem with other users. Have included requirements.txt file that I generated with this report. \r\n\r\n## Environment\r\n\r\n - Cannot get the napari up to show the napari info above. Have extracted the napari version from the pip requirements.txt file. \r\n\r\n - Any other relevant information:\r\n\r\n## Additional context\r\n\r\n<!-- Add any other context about the problem here. -->\r\nThis is on a windows machine. \r\n[requirements.txt](https://github.com/napari/napari/files/10249367/requirements.txt)\r\n\n", "before_files": [{"content": "\"\"\"QtPoll class.\n\nPoll visuals or other objects so they can do things even when the\nmouse/camera are not moving. Usually for just a short period of time.\n\"\"\"\nimport time\nfrom typing import Optional\n\nfrom qtpy.QtCore import QEvent, QObject, QTimer\n\nfrom napari.utils.events import EmitterGroup\n\n# When running a timer we use this interval.\nPOLL_INTERVAL_MS = 16.666  # About 60HZ\n\n# If called more often than this we ignore it. Our _on_camera() method can\n# be called multiple times in on frame. It can get called because the\n# \"center\" changed and then the \"zoom\" changed even if it was really from\n# the same camera movement.\nIGNORE_INTERVAL_MS = 10\n\n\nclass QtPoll(QObject):\n    \"\"\"Polls anything once per frame via an event.\n\n    QtPoll was first created for VispyTiledImageLayer. It polls the visual\n    when the camera moves. However, we also want visuals to keep loading\n    chunks even when the camera stops. We want the visual to finish up\n    anything that was in progress. Before it goes fully idle.\n\n    QtPoll will poll those visuals using a timer. If the visual says the\n    event was \"handled\" it means the visual has more work to do. If that\n    happens, QtPoll will continue to poll and draw the visual it until the\n    visual is done with the in-progress work.\n\n    An analogy is a snow globe. The user moving the camera shakes up the\n    snow globe. We need to keep polling/drawing things until all the snow\n    settles down. Then everything will stay completely still until the\n    camera is moved again, shaking up the globe once more.\n\n    Parameters\n    ----------\n    parent : QObject\n        Parent Qt object.\n    camera : Camera\n        The viewer's main camera.\n    \"\"\"\n\n    def __init__(self, parent: QObject):\n        super().__init__(parent)\n\n        self.events = EmitterGroup(source=self, poll=None)\n\n        self.timer = QTimer()\n        self.timer.setInterval(POLL_INTERVAL_MS)\n        self.timer.timeout.connect(self._on_timer)\n        self._interval = IntervalTimer()\n\n    def on_camera(self) -> None:\n        \"\"\"Called when camera view changes.\"\"\"\n        # When the mouse button is down and the camera is being zoomed\n        # or panned, timer events are starved out. So we call poll\n        # explicitly here. It will start the timer if needed so that\n        # polling can continue even after the camera stops moving.\n        self._poll()\n\n    def wake_up(self) -> None:\n        \"\"\"Wake up QtPoll so it starts polling.\"\"\"\n        # Start the timer so that we start polling. We used to poll once\n        # right away here, but it led to crashes. Because we polled during\n        # a paintGL event?\n        if not self.timer.isActive():\n            self.timer.start()\n\n    def _on_timer(self) -> None:\n        \"\"\"Called when the timer is running.\n\n        The timer is running which means someone we are polling still has\n        work to do.\n        \"\"\"\n        self._poll()\n\n    def _poll(self) -> None:\n        \"\"\"Called on camera move or with the timer.\"\"\"\n\n        # Between timers and camera and wake_up() we might be called multiple\n        # times in quick succession. Use an IntervalTimer to ignore these\n        # near-duplicate calls.\n        if self._interval.elapsed_ms < IGNORE_INTERVAL_MS:\n            return\n\n        # Poll all listeners.\n        event = self.events.poll()\n\n        # Listeners will \"handle\" the event if they need more polling. If\n        # no one needs polling, then we can stop the timer.\n        if not event.handled:\n            self.timer.stop()\n            return\n\n        # Someone handled the event, so they want to be polled even if\n        # the mouse doesn't move. So start the timer if needed.\n        if not self.timer.isActive():\n            self.timer.start()\n\n    def closeEvent(self, _event: QEvent) -> None:\n        \"\"\"Cleanup and close.\n\n        Parameters\n        ----------\n        _event : QEvent\n            The close event.\n        \"\"\"\n        self.timer.stop()\n        self.deleteLater()\n\n\nclass IntervalTimer:\n    \"\"\"Time the interval between subsequent calls to our elapsed property.\"\"\"\n\n    def __init__(self):\n        self._last: Optional[float] = None\n\n    @property\n    def elapsed_ms(self) -> float:\n        \"\"\"The elapsed time since the last call to this property.\"\"\"\n        now = time.time()\n        elapsed_seconds = 0 if self._last is None else now - self._last\n        self._last = now\n        return elapsed_seconds * 1000\n", "path": "napari/_qt/experimental/qt_poll.py"}], "after_files": [{"content": "\"\"\"QtPoll class.\n\nPoll visuals or other objects so they can do things even when the\nmouse/camera are not moving. Usually for just a short period of time.\n\"\"\"\nimport time\nfrom typing import Optional\n\nfrom qtpy.QtCore import QEvent, QObject, QTimer\n\nfrom napari.utils.events import EmitterGroup\n\n# When running a timer we use this interval.\nPOLL_INTERVAL_MS = 16  # About 60HZ, needs to be an int for QTimer setInterval\n\n# If called more often than this we ignore it. Our _on_camera() method can\n# be called multiple times in on frame. It can get called because the\n# \"center\" changed and then the \"zoom\" changed even if it was really from\n# the same camera movement.\nIGNORE_INTERVAL_MS = 10\n\n\nclass QtPoll(QObject):\n    \"\"\"Polls anything once per frame via an event.\n\n    QtPoll was first created for VispyTiledImageLayer. It polls the visual\n    when the camera moves. However, we also want visuals to keep loading\n    chunks even when the camera stops. We want the visual to finish up\n    anything that was in progress. Before it goes fully idle.\n\n    QtPoll will poll those visuals using a timer. If the visual says the\n    event was \"handled\" it means the visual has more work to do. If that\n    happens, QtPoll will continue to poll and draw the visual it until the\n    visual is done with the in-progress work.\n\n    An analogy is a snow globe. The user moving the camera shakes up the\n    snow globe. We need to keep polling/drawing things until all the snow\n    settles down. Then everything will stay completely still until the\n    camera is moved again, shaking up the globe once more.\n\n    Parameters\n    ----------\n    parent : QObject\n        Parent Qt object.\n    camera : Camera\n        The viewer's main camera.\n    \"\"\"\n\n    def __init__(self, parent: QObject):\n        super().__init__(parent)\n\n        self.events = EmitterGroup(source=self, poll=None)\n\n        self.timer = QTimer()\n        self.timer.setInterval(POLL_INTERVAL_MS)\n        self.timer.timeout.connect(self._on_timer)\n        self._interval = IntervalTimer()\n\n    def on_camera(self) -> None:\n        \"\"\"Called when camera view changes.\"\"\"\n        # When the mouse button is down and the camera is being zoomed\n        # or panned, timer events are starved out. So we call poll\n        # explicitly here. It will start the timer if needed so that\n        # polling can continue even after the camera stops moving.\n        self._poll()\n\n    def wake_up(self) -> None:\n        \"\"\"Wake up QtPoll so it starts polling.\"\"\"\n        # Start the timer so that we start polling. We used to poll once\n        # right away here, but it led to crashes. Because we polled during\n        # a paintGL event?\n        if not self.timer.isActive():\n            self.timer.start()\n\n    def _on_timer(self) -> None:\n        \"\"\"Called when the timer is running.\n\n        The timer is running which means someone we are polling still has\n        work to do.\n        \"\"\"\n        self._poll()\n\n    def _poll(self) -> None:\n        \"\"\"Called on camera move or with the timer.\"\"\"\n\n        # Between timers and camera and wake_up() we might be called multiple\n        # times in quick succession. Use an IntervalTimer to ignore these\n        # near-duplicate calls.\n        if self._interval.elapsed_ms < IGNORE_INTERVAL_MS:\n            return\n\n        # Poll all listeners.\n        event = self.events.poll()\n\n        # Listeners will \"handle\" the event if they need more polling. If\n        # no one needs polling, then we can stop the timer.\n        if not event.handled:\n            self.timer.stop()\n            return\n\n        # Someone handled the event, so they want to be polled even if\n        # the mouse doesn't move. So start the timer if needed.\n        if not self.timer.isActive():\n            self.timer.start()\n\n    def closeEvent(self, _event: QEvent) -> None:\n        \"\"\"Cleanup and close.\n\n        Parameters\n        ----------\n        _event : QEvent\n            The close event.\n        \"\"\"\n        self.timer.stop()\n        self.deleteLater()\n\n\nclass IntervalTimer:\n    \"\"\"Time the interval between subsequent calls to our elapsed property.\"\"\"\n\n    def __init__(self):\n        self._last: Optional[float] = None\n\n    @property\n    def elapsed_ms(self) -> float:\n        \"\"\"The elapsed time since the last call to this property.\"\"\"\n        now = time.time()\n        elapsed_seconds = 0 if self._last is None else now - self._last\n        self._last = now\n        return elapsed_seconds * 1000\n", "path": "napari/_qt/experimental/qt_poll.py"}]}