Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[backend_fs] externally deleting a glyph does not work with the change watcher #37

Open
justvanrossum opened this issue Jan 27, 2023 · 1 comment

Comments

@justvanrossum
Copy link
Collaborator

Error:

2023-01-27 11:07:18 fontra.core.fonthandler ERROR    fatal exception in asyncio task <Task finished name='Task-111' coro=<FontHandler.processExternalChanges() done, defined at /Users/just/code/git/BlackFoundry/fontra/src/fontra/core/fonthandler.py:86> exception=FileNotFoundError(2, 'No such file or directory')>
Traceback (most recent call last):
  File "/Users/just/code/git/BlackFoundry/fontra/src/fontra/core/fonthandler.py", line 87, in processExternalChanges
    async for change, reloadPattern in self.backend.watchExternalChanges():
  File "/Users/just/code/git/BlackFoundry/fontra-rcjk/src/fontra_rcjk/backend_fs.py", line 150, in watchExternalChanges
    if self._recentlyWrittenPaths.pop(path, None) == os.path.getmtime(path):
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/genericpath.py", line 55, in getmtime
    return os.stat(filename).st_mtime
FileNotFoundError: [Errno 2] No such file or directory: '/path/to/project.rcjk/characterGlyph/a.glif'

This may be a combination of two things

The watchfiles oddity probably deserves a wrapper, so that watchfiles client code doesn't need to worry about it.

@justvanrossum
Copy link
Collaborator Author

Externally adding a glyph also doesn't seem to work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 📋 Backlog
Development

No branches or pull requests

1 participant