Skip to content

Commit

Permalink
kqueue.py: fix AttributeError: 'DirectorySnapshot' object has no attr…
Browse files Browse the repository at this point in the history
…ibute 'path_for_inode'
  • Loading branch information
BoboTiG committed Feb 17, 2019
1 parent 7273ab8 commit 6062026
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/watchdog/observers/kqueue.py
Original file line number Diff line number Diff line change
Expand Up @@ -608,7 +608,7 @@ def _queue_renamed(self,

try:
dest_path = absolute_path(
new_snapshot.path_for_inode(ref_stat_info.st_ino))
new_snapshot.path(ref_stat_info.st_ino))
if is_directory:
event = DirMovedEvent(src_path, dest_path)
# TODO: Do we need to fire moved events for the items
Expand Down

1 comment on commit 6062026

@toxadx
Copy link

@toxadx toxadx commented on 6062026 Feb 18, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A new error is occurring on file write in vim:

Exception in thread Thread-5:
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/threading.py", line 916, in _bootstrap_inner  
    self.run()
  File "/home/toxa/projects/radium-it/venv/lib/python3.6/site-packages/watchdog/
observers/api.py", line 146, in run
    self.queue_events(self.timeout)
  File "/home/toxa/projects/radium-it/venv/lib/python3.6/site-packages/watchdog/
observers/kqueue.py", line 676, in queue_events                                
    new_snapshot)
  File "/home/toxa/projects/radium-it/venv/lib/python3.6/site-packages/watchdog/
observers/kqueue.py", line 611, in _queue_renamed                              
    new_snapshot.path(ref_stat_info.st_ino))                                   
  File "/home/toxa/projects/radium-it/venv/lib/python3.6/site-packages/pathtools
/path.py", line 183, in absolute_path
    return os.path.abspath(os.path.normpath(path))                             
  File "/usr/local/lib/python3.6/posixpath.py", line 340, in normpath          
    path = os.fspath(path)
TypeError: expected str, bytes or os.PathLike object, not NoneType 

Please sign in to comment.