Closed mrclary closed 3 years ago
I think this may no longer be an issue with watchdog
but requires some updates on our end. See comment from @boboTiG.
Spyder 5.0.3 with watchdog 2.1.1: I no longer see the watchdog RuntimeError when switching projects. However I see a Qt error. Could be openSUSE specific though, as we don't pin to PyQt5 < 5.13:
Traceback (most recent call last):
File "/usr/lib/python3.8/site-packages/spyder/plugins/editor/widgets/editor.py", line 2177, in focus_changed
self.refresh()
File "/usr/lib/python3.8/site-packages/spyder/plugins/editor/widgets/editor.py", line 2320, in refresh
self._refresh_outlineexplorer(index, update=False)
File "/usr/lib/python3.8/site-packages/spyder/plugins/editor/widgets/editor.py", line 2190, in _refresh_outlineexplorer
oe.set_current_editor(finfo.editor.oe_proxy,
File "/usr/lib/python3.8/site-packages/spyder/plugins/outlineexplorer/widgets.py", line 1012, in set_current_editor
self.treewidget.set_current_editor(editor, update)
File "/usr/lib/python3.8/site-packages/spyder/plugins/outlineexplorer/widgets.py", line 488, in set_current_editor
self.current_editor = editor
File "/usr/lib/python3.8/site-packages/spyder/plugins/outlineexplorer/widgets.py", line 344, in current_editor
self.connect_current_editor(True)
File "/usr/lib/python3.8/site-packages/spyder/plugins/outlineexplorer/widgets.py", line 453, in connect_current_editor
self.do_follow_cursor()
File "/usr/lib/python3.8/site-packages/spyder/plugins/outlineexplorer/widgets.py", line 407, in do_follow_cursor
self.go_to_cursor_position()
File "/usr/lib/python3.8/site-packages/spyder/plugins/outlineexplorer/widgets.py", line 412, in go_to_cursor_position
editor_id = self.editor_ids[self.current_editor]
KeyError: <spyder.plugins.outlineexplorer.editor.OutlineExplorerProxyEditor object at 0x7f0efd7ea280>
Traceback (most recent call last):
File "/usr/lib/python3.8/site-packages/spyder/plugins/editor/panels/debugger.py", line 89, in paintEvent
painter.fillRect(event.rect(), self.editor.sideareas_color)
TypeError: arguments did not match any overloaded call:
fillRect(self, QRectF, Union[QBrush, QColor, Qt.GlobalColor, QGradient]): argument 1 has unexpected type 'QRect'
fillRect(self, QRect, Union[QBrush, QColor, Qt.GlobalColor, QGradient]): argument 2 has unexpected type 'NoneType'
fillRect(self, int, int, int, int, Union[QBrush, QColor, Qt.GlobalColor, QGradient]): argument 1 has unexpected type 'QRect'
fillRect(self, QRectF, Union[QColor, Qt.GlobalColor, QGradient]): argument 1 has unexpected type 'QRect'
fillRect(self, QRect, Union[QColor, Qt.GlobalColor, QGradient]): argument 2 has unexpected type 'NoneType'
fillRect(self, int, int, int, int, Union[QColor, Qt.GlobalColor, QGradient]): argument 1 has unexpected type 'QRect'
fillRect(self, int, int, int, int, Qt.GlobalColor): argument 1 has unexpected type 'QRect'
fillRect(self, QRect, Qt.GlobalColor): argument 2 has unexpected type 'NoneType'
fillRect(self, QRectF, Qt.GlobalColor): argument 1 has unexpected type 'QRect'
fillRect(self, int, int, int, int, Qt.BrushStyle): argument 1 has unexpected type 'QRect'
fillRect(self, QRect, Qt.BrushStyle): argument 2 has unexpected type 'NoneType'
fillRect(self, QRectF, Qt.BrushStyle): argument 1 has unexpected type 'QRect'
fillRect(self, int, int, int, int, QGradient.Preset): argument 1 has unexpected type 'QRect'
fillRect(self, QRect, QGradient.Preset): argument 2 has unexpected type 'NoneType'
fillRect(self, QRectF, QGradient.Preset): argument 1 has unexpected type 'QRect'
Traceback (most recent call last):
File "/usr/lib/python3.8/site-packages/spyder/plugins/editor/panels/linenumber.py", line 68, in paintEvent
painter.fillRect(event.rect(), self.editor.sideareas_color)
TypeError: arguments did not match any overloaded call:
fillRect(self, QRectF, Union[QBrush, QColor, Qt.GlobalColor, QGradient]): argument 1 has unexpected type 'QRect'
fillRect(self, QRect, Union[QBrush, QColor, Qt.GlobalColor, QGradient]): argument 2 has unexpected type 'NoneType'
fillRect(self, int, int, int, int, Union[QBrush, QColor, Qt.GlobalColor, QGradient]): argument 1 has unexpected type 'QRect'
fillRect(self, QRectF, Union[QColor, Qt.GlobalColor, QGradient]): argument 1 has unexpected type 'QRect'
fillRect(self, QRect, Union[QColor, Qt.GlobalColor, QGradient]): argument 2 has unexpected type 'NoneType'
fillRect(self, int, int, int, int, Union[QColor, Qt.GlobalColor, QGradient]): argument 1 has unexpected type 'QRect'
fillRect(self, int, int, int, int, Qt.GlobalColor): argument 1 has unexpected type 'QRect'
fillRect(self, QRect, Qt.GlobalColor): argument 2 has unexpected type 'NoneType'
fillRect(self, QRectF, Qt.GlobalColor): argument 1 has unexpected type 'QRect'
fillRect(self, int, int, int, int, Qt.BrushStyle): argument 1 has unexpected type 'QRect'
fillRect(self, QRect, Qt.BrushStyle): argument 2 has unexpected type 'NoneType'
fillRect(self, QRectF, Qt.BrushStyle): argument 1 has unexpected type 'QRect'
fillRect(self, int, int, int, int, QGradient.Preset): argument 1 has unexpected type 'QRect'
fillRect(self, QRect, QGradient.Preset): argument 2 has unexpected type 'NoneType'
fillRect(self, QRectF, QGradient.Preset): argument 1 has unexpected type 'QRect'
Traceback (most recent call last):
File "/usr/lib/python3.8/site-packages/spyder/plugins/editor/panels/scrollflag.py", line 183, in paintEvent
painter.fillRect(event.rect(), self.editor.sideareas_color)
TypeError: arguments did not match any overloaded call:
fillRect(self, QRectF, Union[QBrush, QColor, Qt.GlobalColor, QGradient]): argument 1 has unexpected type 'QRect'
fillRect(self, QRect, Union[QBrush, QColor, Qt.GlobalColor, QGradient]): argument 2 has unexpected type 'NoneType'
fillRect(self, int, int, int, int, Union[QBrush, QColor, Qt.GlobalColor, QGradient]): argument 1 has unexpected type 'QRect'
fillRect(self, QRectF, Union[QColor, Qt.GlobalColor, QGradient]): argument 1 has unexpected type 'QRect'
fillRect(self, QRect, Union[QColor, Qt.GlobalColor, QGradient]): argument 2 has unexpected type 'NoneType'
fillRect(self, int, int, int, int, Union[QColor, Qt.GlobalColor, QGradient]): argument 1 has unexpected type 'QRect'
fillRect(self, int, int, int, int, Qt.GlobalColor): argument 1 has unexpected type 'QRect'
fillRect(self, QRect, Qt.GlobalColor): argument 2 has unexpected type 'NoneType'
fillRect(self, QRectF, Qt.GlobalColor): argument 1 has unexpected type 'QRect'
fillRect(self, int, int, int, int, Qt.BrushStyle): argument 1 has unexpected type 'QRect'
fillRect(self, QRect, Qt.BrushStyle): argument 2 has unexpected type 'NoneType'
fillRect(self, QRectF, Qt.BrushStyle): argument 1 has unexpected type 'QRect'
fillRect(self, int, int, int, int, QGradient.Preset): argument 1 has unexpected type 'QRect'
fillRect(self, QRect, QGradient.Preset): argument 2 has unexpected type 'NoneType'
fillRect(self, QRectF, QGradient.Preset): argument 1 has unexpected type 'QRect'
I can confirm that the original post is NOT resolved with watchdog=2.1.1
running from bootstrap on macOS Catalina in a conda environment.
I cannot reproduce the KeyError mentioned by @bnavigator.
ERROR:fsevents:Unhandled exception in FSEventsEmitter
Traceback (most recent call last):
File "/Users/rclary/opt/miniconda3/envs/spy-dev/lib/python3.9/site-packages/watchdog/observers/fsevents.py", line 309, in run
_fsevents.add_watch(self, self.watch, self.events_callback, self.pathnames)
RuntimeError: Cannot add watch <ObservedWatch: path=/Users/rclary/Documents/Python/c2w, is_recursive=True> - it is already scheduled
I wonder if this issue is related to #14787...
One more note: Even with watchdog 1.0.2, I get the above error about sideareas_color = None
. So the error is unrelated to the watchdog issue.
Okay, I can confirm that the OP still manifests when running from bootstrap in a pyenv environment with watchdog=2.1.2
and PyQt5=5.12.3
(conda's main channel is stuck at 5.9.2)
@bnavigator , it actually looks like your first error is
editor_id = self.editor_ids[self.current_editor]
KeyError: <spyder.plugins.outlineexplorer.editor.OutlineExplorerProxyEditor object at 0x7f0efd7ea280>
which means that self.current_editor
returns an OutlineExplorerProxyEditor
object instead of a string object. Could this be related to PyQt5 >= 5.13?
Okay, I can also confirm that the OP still manifests when running from bootstrap in a pyenv environment with watchdog=2.1.2 and PyQt5=5.15.4, and I cannot reproduce @bnavigator's KeyError
.
As further clarification, regardless of launch environment, the OP issue only results in the error posting to the launch terminal, NOT the internal Python interpreter and does NOT produce an Issue Reporter pop-up window. This means that running a standalone macOS app does NOT make this issue visible to the user. The issue still occurs, however, as it is reported to the Terminal when launching in this manner
$ Spyder.app/Contents/MacOS/Spyder
could this Watchdog constraint be only limited to MacOS ? so non-MacOS Users would be not impacted ?
could this Watchdog constraint be only limited to MacOS ? so non-MacOS Users would be not impacted ?
Can anyone test this on Windows or Ubuntu? I've pushed up branch constrain-watchdog if that's helpful. I cannot get the language server to work with bootstrap in my Windows VM.
Problem Description
The advent of
watchdog>2.0.0
manifested several issues, one of which was solved withwatchdog=2.0.2
but uncovered aRuntimeError
. See #14779.watchdog>1.0.2
is not yet available on conda main channel, so bootstrap requires updating via conda-forge in order to manifest the issue.What steps reproduce the problem?
Paste Traceback/Error Below (if applicable)
Versions
Dependencies
Dependencies
``` # Mandatory: applaunchservices >=0.1.7 : 0.2.1 (OK) atomicwrites >=1.2.0 : 1.4.0 (OK) chardet >=2.0.0 : 4.0.0 (OK) cloudpickle >=0.5.0 : 1.6.0 (OK) diff_match_patch >=20181111 : 20200713 (OK) intervaltree >=3.0.2 : 3.1.0 (OK) IPython >=7.6.0 : 7.20.0 (OK) jedi =0.17.2 : 0.17.2 (OK) jsonschema >=3.2.0 : 3.2.0 (OK) keyring >=17.0.0 : 22.0.1 (OK) nbconvert >=4.0 : 6.0.7 (OK) numpydoc >=0.6.0 : 1.1.0 (OK) parso =0.7.0 : 0.7.0 (OK) pexpect >=4.4.0 : 4.8.0 (OK) pickleshare >=0.4 : 0.7.5 (OK) psutil >=5.3 : 5.8.0 (OK) pygments >=2.0 : 2.8.0 (OK) pylint >=1.0 : 2.7.0 (OK) pyls >=0.36.2;<1.0.0 : 0.36.2 (OK) pyls_black >=0.4.6 : 0.4.6 (OK) pyls_spyder >=0.3.2 : 0.3.2 (OK) qdarkstyle >=2.8 : 2.8.1 (OK) qtawesome >=0.5.7 : 1.0.2 (OK) qtconsole >=5.0.1 : 5.0.2 (OK) qtpy >=1.5.0 : 1.9.0 (OK) setuptools >=39.0.0 : 52.0.0 (OK) sphinx >=0.6.6 : 3.5.1 (OK) spyder_kernels >=1.10.2;<1.11.0 : 1.10.2 (OK) textdistance >=4.2.0 : 4.2.1 (OK) three_merge >=0.1.1 : 0.1.1 (OK) watchdog >=0.10.3 : 2.0.2 (OK) zmq >=17 : 22.0.3 (OK) ```