question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

RuntimeError when switching projects with watchdog>=2.0.0

See original GitHub issue

Problem Description

The advent of watchdog>2.0.0 manifested several issues, one of which was solved with watchdog=2.0.2 but uncovered a RuntimeError. 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?

  1. Switch from one project to another
  2. Switch back to original project
  3. Spyder issue reporter launches

Paste Traceback/Error Below (if applicable)

File "watchdog/observers/fsevents.pyc", line 283, in run
RuntimeError: Cannot add watch <ObservedWatch: path=/Users/rclary/Documents/Python/spyder-kernels, is_recursive=True> - it is already scheduled

Versions

  • Spyder version: 4.2.2 None
  • Python version: 3.9.1 64-bit
  • Qt version: 5.12.10
  • PyQt5 version: 5.12.3
  • Operating System: Darwin 19.6.0

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)

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:11 (11 by maintainers)

github_iconTop GitHub Comments

1reaction
stonebigcommented, May 22, 2021

could this Watchdog constraint be only limited to MacOS ? so non-MacOS Users would be not impacted ?

1reaction
mrclarycommented, May 21, 2021

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.

Pyenv environment: RuntimeError
  • Spyder version: 5.1.0.dev0 65294a8b8
  • Python version: 3.9.4 64-bit
  • Qt version: 5.15.2
  • PyQt5 version: 5.15.4
  • Operating System: Darwin 19.6.0
Package                                           Version    Location
------------------------------------------------- ---------- ------------------------------------------------------------------
alabaster                                         0.7.12
altgraph                                          0.17
appdirs                                           1.4.4
applaunchservices                                 0.2.1
appnope                                           0.1.2
arrow                                             1.1.0
astroid                                           2.5.6
async-generator                                   1.10
atomicwrites                                      1.4.0
attrs                                             21.2.0
autopep8                                          1.5.5
Babel                                             2.9.1
backcall                                          0.2.0
bcrypt                                            3.2.0
binaryornot                                       0.4.4
black                                             21.5b1
bleach                                            3.3.0
certifi                                           2020.12.5
cffi                                              1.14.5
chardet                                           4.0.0
click                                             8.0.1
cloudpickle                                       1.6.0
cookiecutter                                      1.7.3
coverage                                          5.5
cryptography                                      3.4.7
cycler                                            0.10.0
Cython                                            0.29.23
decorator                                         4.4.2
defusedxml                                        0.7.1
diff-match-patch                                  20200713
dmgbuild                                          1.4.2
docutils                                          0.17.1
ds-store                                          1.3.0
entrypoints                                       0.3
flake8                                            3.8.4
flaky                                             3.7.0
idna                                              2.10
imagesize                                         1.2.0
importlib-metadata                                4.0.1
inflection                                        0.5.1
intervaltree                                      3.1.0
ipykernel                                         5.5.5
ipython                                           7.23.1
ipython-genutils                                  0.2.0
isort                                             5.8.0
jedi                                              0.17.2
Jinja2                                            3.0.1
jinja2-time                                       0.2.0
jsonschema                                        3.2.0
jupyter-client                                    6.1.12
jupyter-core                                      4.7.1
jupyterlab-pygments                               0.1.2
keyring                                           23.0.1
kiwisolver                                        1.3.1
lazy-object-proxy                                 1.6.0
mac-alias                                         2.2.0
macholib                                          1.14
MarkupSafe                                        2.0.1
matplotlib                                        3.4.2
matplotlib-inline                                 0.1.2
mccabe                                            0.6.1
mistune                                           0.8.4
modulegraph                                       0.18
more-itertools                                    8.8.0
mpmath                                            1.2.1
mypy-extensions                                   0.4.3
nbclient                                          0.5.3
nbconvert                                         6.0.7
nbformat                                          5.1.3
nest-asyncio                                      1.5.1
numpy                                             1.20.3
numpydoc                                          1.1.0
packaging                                         20.9
pandas                                            1.2.4
pandocfilters                                     1.4.3
paramiko                                          2.7.2
parso                                             0.7.0
pathspec                                          0.8.1
pexpect                                           4.8.0
pickleshare                                       0.7.5
Pillow                                            8.2.0
pip                                               21.1.1
pluggy                                            0.13.1
poyo                                              0.5.0
prompt-toolkit                                    3.0.18
psutil                                            5.8.0
ptyprocess                                        0.7.0
py                                                1.10.0
py2app                                            0.22
pycodestyle                                       2.6.0
pycparser                                         2.20
pydocstyle                                        6.1.1
pyflakes                                          2.2.0
Pygments                                          2.9.0
pylint                                            2.8.2
pyls-black                                        0.4.6
pyls-spyder                                       0.3.2
PyNaCl                                            1.4.0
pyobjc                                            7.2
pyobjc-core                                       7.2
pyobjc-framework-Accounts                         7.2
pyobjc-framework-AddressBook                      7.2
pyobjc-framework-AdSupport                        7.2
pyobjc-framework-AppleScriptKit                   7.2
pyobjc-framework-AppleScriptObjC                  7.2
pyobjc-framework-ApplicationServices              7.2
pyobjc-framework-AuthenticationServices           7.2
pyobjc-framework-AutomaticAssessmentConfiguration 7.2
pyobjc-framework-Automator                        7.2
pyobjc-framework-AVFoundation                     7.2
pyobjc-framework-AVKit                            7.2
pyobjc-framework-BusinessChat                     7.2
pyobjc-framework-CalendarStore                    7.2
pyobjc-framework-CFNetwork                        7.2
pyobjc-framework-CloudKit                         7.2
pyobjc-framework-Cocoa                            7.2
pyobjc-framework-Collaboration                    7.2
pyobjc-framework-ColorSync                        7.2
pyobjc-framework-Contacts                         7.2
pyobjc-framework-ContactsUI                       7.2
pyobjc-framework-CoreAudio                        7.2
pyobjc-framework-CoreAudioKit                     7.2
pyobjc-framework-CoreBluetooth                    7.2
pyobjc-framework-CoreData                         7.2
pyobjc-framework-CoreHaptics                      7.2
pyobjc-framework-CoreLocation                     7.2
pyobjc-framework-CoreMedia                        7.2
pyobjc-framework-CoreMediaIO                      7.2
pyobjc-framework-CoreMIDI                         7.2
pyobjc-framework-CoreML                           7.2
pyobjc-framework-CoreMotion                       7.2
pyobjc-framework-CoreServices                     7.2
pyobjc-framework-CoreSpotlight                    7.2
pyobjc-framework-CoreText                         7.2
pyobjc-framework-CoreWLAN                         7.2
pyobjc-framework-CryptoTokenKit                   7.2
pyobjc-framework-DeviceCheck                      7.2
pyobjc-framework-DictionaryServices               7.2
pyobjc-framework-DiscRecording                    7.2
pyobjc-framework-DiscRecordingUI                  7.2
pyobjc-framework-DiskArbitration                  7.2
pyobjc-framework-DVDPlayback                      7.2
pyobjc-framework-EventKit                         7.2
pyobjc-framework-ExceptionHandling                7.2
pyobjc-framework-ExecutionPolicy                  7.2
pyobjc-framework-ExternalAccessory                7.2
pyobjc-framework-FileProvider                     7.2
pyobjc-framework-FileProviderUI                   7.2
pyobjc-framework-FinderSync                       7.2
pyobjc-framework-FSEvents                         7.2
pyobjc-framework-GameCenter                       7.2
pyobjc-framework-GameController                   7.2
pyobjc-framework-GameKit                          7.2
pyobjc-framework-GameplayKit                      7.2
pyobjc-framework-ImageCaptureCore                 7.2
pyobjc-framework-IMServicePlugIn                  7.2
pyobjc-framework-InputMethodKit                   7.2
pyobjc-framework-InstallerPlugins                 7.2
pyobjc-framework-InstantMessage                   7.2
pyobjc-framework-Intents                          7.2
pyobjc-framework-IOSurface                        7.2
pyobjc-framework-iTunesLibrary                    7.2
pyobjc-framework-LatentSemanticMapping            7.2
pyobjc-framework-LaunchServices                   7.2
pyobjc-framework-libdispatch                      7.2
pyobjc-framework-LinkPresentation                 7.2
pyobjc-framework-LocalAuthentication              7.2
pyobjc-framework-MapKit                           7.2
pyobjc-framework-MediaAccessibility               7.2
pyobjc-framework-MediaLibrary                     7.2
pyobjc-framework-MediaPlayer                      7.2
pyobjc-framework-MediaToolbox                     7.2
pyobjc-framework-Metal                            7.2
pyobjc-framework-MetalKit                         7.2
pyobjc-framework-MetalPerformanceShaders          7.2
pyobjc-framework-ModelIO                          7.2
pyobjc-framework-MultipeerConnectivity            7.2
pyobjc-framework-NaturalLanguage                  7.2
pyobjc-framework-NetFS                            7.2
pyobjc-framework-Network                          7.2
pyobjc-framework-NetworkExtension                 7.2
pyobjc-framework-NotificationCenter               7.2
pyobjc-framework-OpenDirectory                    7.2
pyobjc-framework-OSAKit                           7.2
pyobjc-framework-OSLog                            7.2
pyobjc-framework-PencilKit                        7.2
pyobjc-framework-Photos                           7.2
pyobjc-framework-PhotosUI                         7.2
pyobjc-framework-PreferencePanes                  7.2
pyobjc-framework-PushKit                          7.2
pyobjc-framework-Quartz                           7.2
pyobjc-framework-QuickLookThumbnailing            7.2
pyobjc-framework-SafariServices                   7.2
pyobjc-framework-SceneKit                         7.2
pyobjc-framework-ScreenSaver                      7.2
pyobjc-framework-ScriptingBridge                  7.2
pyobjc-framework-SearchKit                        7.2
pyobjc-framework-Security                         7.2
pyobjc-framework-SecurityFoundation               7.2
pyobjc-framework-SecurityInterface                7.2
pyobjc-framework-ServiceManagement                7.2
pyobjc-framework-Social                           7.2
pyobjc-framework-SoundAnalysis                    7.2
pyobjc-framework-Speech                           7.2
pyobjc-framework-SpriteKit                        7.2
pyobjc-framework-StoreKit                         7.2
pyobjc-framework-SyncServices                     7.2
pyobjc-framework-SystemConfiguration              7.2
pyobjc-framework-SystemExtensions                 7.2
pyobjc-framework-UserNotifications                7.2
pyobjc-framework-VideoSubscriberAccount           7.2
pyobjc-framework-VideoToolbox                     7.2
pyobjc-framework-Vision                           7.2
pyobjc-framework-WebKit                           7.2
pyparsing                                         2.4.7
PyQt5                                             5.15.4
PyQt5-Qt5                                         5.15.2
PyQt5-sip                                         12.9.0
PyQtWebEngine                                     5.15.4
PyQtWebEngine-Qt5                                 5.15.2
pyrsistent                                        0.17.3
pytest                                            5.4.3
pytest-cov                                        2.12.0
pytest-lazy-fixture                               0.6.3
pytest-mock                                       3.6.1
pytest-order                                      0.11.0
pytest-qt                                         3.3.0
python-dateutil                                   2.8.1
python-jsonrpc-server                             0.4.0
python-slugify                                    5.0.2
pytz                                              2021.1
pyxdg                                             0.27
PyYAML                                            5.4.1
pyzmq                                             22.0.3
QDarkStyle                                        3.0.dev0   /Users/rclary/Documents/Python/spyder/external-deps/qdarkstyle
qstylizer                                         0.2.0
QtAwesome                                         1.0.2
qtconsole                                         5.1.0
QtPy                                              1.9.0
regex                                             2021.4.4
requests                                          2.25.1
rope                                              0.19.0
Rtree                                             0.9.7
scipy                                             1.6.3
setuptools                                        56.2.0
six                                               1.16.0
snowballstemmer                                   2.1.0
sortedcontainers                                  2.4.0
Sphinx                                            4.0.2
sphinxcontrib-applehelp                           1.0.2
sphinxcontrib-devhelp                             1.0.2
sphinxcontrib-htmlhelp                            1.0.3
sphinxcontrib-jsmath                              1.0.1
sphinxcontrib-qthelp                              1.0.3
sphinxcontrib-serializinghtml                     1.1.4
spyder-kernels                                    2.1.0.dev0 /Users/rclary/Documents/Python/spyder/external-deps/spyder-kernels
sympy                                             1.8
testpath                                          0.5.0
text-unidecode                                    1.3
textdistance                                      4.2.1
three-merge                                       0.1.1
tinycss2                                          1.1.0
toml                                              0.10.2
tornado                                           6.1
traitlets                                         5.0.5
ujson                                             4.0.2
urllib3                                           1.26.4
watchdog                                          2.1.2
wcwidth                                           0.2.5
webencodings                                      0.5.1
wrapt                                             1.12.1
wurlitzer                                         2.1.0
yapf                                              0.31.0
zipp                                              3.4.1

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
Read more comments on GitHub >

github_iconTop Results From Across the Web

(re)start and watchdog timing is fragile; leads to device not ...
RuntimeError : Failed to find device after booting, error message: ... Thursday I'll change the connect timeout in depthai-core and see if ...
Read more >
The URScript Programming Language for e- Series
information herein is subject to change without notice and should not be construed as a ... 16.1.1. enable_external_ft_sensor(enable, sensor_mass=0.0, ...
Read more >
MACHINELOGIC
MachineLogic projects and MachineLogic Runtime: Describes resources, tasks, and pre-emptive scheduling. • Downloading, controlling, and debugging: Provides ...
Read more >
DC FunRef.book - Cika
When a runtime error occurs, the following information is passed to the error ... change anything in any of the parameters while doing...
Read more >
Rexroth IndraMotion MTX Diagnosis Messages - Bosch Rexroth
Before switching on the device, the equipment grounding conductor must have been permanently connected to all electrical equipment in accord-.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found