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

During glass_watch, when a file is renamed, watch stops with an error #1

Open
kkellydesign opened this issue Jan 7, 2016 · 0 comments
Assignees

Comments

@kkellydesign
Copy link
Member

To create a new file I typically just copy a similar file, then rename it. that throws an error and stops glass watch from running:

Exception in thread Thread-1:
Traceback (most recent call last):
  File "/usr/local/Cellar/python/2.7.8_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/threading.py", line 810, in __bootstrap_inner
    self.run()
  File "/Users/Kasey/.virtualenvs/glass-sites/lib/python2.7/site-packages/watchdog/observers/api.py", line 199, in run
    self.dispatch_events(self.event_queue, self.timeout)
  File "/Users/Kasey/.virtualenvs/glass-sites/lib/python2.7/site-packages/watchdog/observers/api.py", line 368, in dispatch_events
    handler.dispatch(event)
  File "/Users/Kasey/.virtualenvs/glass-sites/lib/python2.7/site-packages/watchdog/events.py", line 330, in dispatch
    _method_map[event_type](event)
  File "/Users/Kasey/Sites/glass-cli/glass.py", line 308, in on_moved
    self.upload(evt)
  File "/Users/Kasey/Sites/glass-cli/glass.py", line 314, in upload
    self.ctx.invoke(put_file, evt.src_path[2:])
  File "/Users/Kasey/.virtualenvs/glass-sites/lib/python2.7/site-packages/click/core.py", line 534, in invoke
    return callback(*args, **kwargs)
  File "/Users/Kasey/.virtualenvs/glass-sites/lib/python2.7/site-packages/click/decorators.py", line 17, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/Users/Kasey/Sites/glass-cli/glass.py", line 258, in put_file
    with open(local_path, 'rb') as fb:
IOError: [Errno 2] No such file or directory: 'templates/projects 2.html'

Where 'projects 2.html' is the default name of a duplicated file before I rename it. I've let a file sit for a while to make sure that I didn't just confuse it while it was trying to upload, but that's not the case. Even if I wait several seconds for the upload to complete before renaming it, I still get the error.

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

No branches or pull requests

2 participants