merofeev / docker-windows-volume-watcher

A tool to notify Docker contianers about changes in mounts on Windows.
MIT License
188 stars 30 forks source link

Error when detecting changes #8

Closed epgeroy closed 6 years ago

epgeroy commented 6 years ago

this is my docker info

Containers: 3 Running: 1 Paused: 0 Stopped: 2 Images: 21 Server Version: 17.12.0-ce Storage Driver: overlay2 Backing Filesystem: extfs Supports d_type: true Native Overlay Diff: true Logging Driver: json-file Cgroup Driver: cgroupfs Plugins: Volume: local Network: bridge host ipvlan macvlan null overlay Log: awslogs fluentd gcplogs gelf journald json-file logentries splunk syslog Swarm: inactive Runtimes: runc Default Runtime: runc Init Binary: docker-init containerd version: 89623f28b87a6004d4b785663257362d1658a729 runc version: b2567b37d7b75eb4cf325b77297b140ea686ce8f init version: 949e6fa Security Options: seccomp Profile: default Kernel Version: 4.9.60-linuxkit-aufs Operating System: Docker for Windows OSType: linux Architecture: x86_64 CPUs: 2 Total Memory: 1.934GiB Name: linuxkit-00155d014d01 ID: ATPD:LEOL:LNRR:KEHA:NR6R:AVKN:LQR6:5XF5:W7VT:6HUP:GUS5:ONDU Docker Root Dir: /var/lib/docker Debug Mode (client): false Debug Mode (server): true File Descriptors: 29 Goroutines: 55 System Time: 2018-02-02T01:09:14.2428761Z EventsListeners: 2 Registry: https://index.docker.io/v1/ Labels: Experimental: true Insecure Registries: 127.0.0.0/8 Live Restore Enabled: false

I'm running docker-volume-watcher and when I change some file throws this exception

Exception in thread Thread-1: Traceback (most recent call last): File "c:\users\XXX\appdata\local\programs\python\python36-32\lib\threading.py", line 916, in _bootstrap_inner self.run() File "c:\users\XXX\appdata\local\programs\python\python36-32\lib\site-packages\watchdog\observers\api.py", line 199, in run self.dispatch_events(self.event_queue, self.timeout) File "c:\users\XXX\appdata\local\programs\python\python36-32\lib\site-packages\watchdog\observers\api.py", line 368, in dispatch_events handler.dispatch(event) File "c:\users\XXX\appdata\local\programs\python\python36-32\lib\site-packages\watchdog\events.py", line 454, in dispatch _method_map[event_type](event) File "c:\users\XXX\appdata\local\programs\python\python36-32\lib\site-packages\docker_volume_watcher\container_notifier.py", line 49, in __change_handler self.notify(absolute_path) File "c:\users\XXX\appdata\local\programs\python\python36-32\lib\site-packages\docker_volume_watcher\container_notifier.py", line 66, in notify permissions = permissions.decode('utf-8').strip() AttributeError: 'ExecResult' object has no attribute 'decode'

I'm unable to find anything related to this on docs and previous issues, so any help will be appreciated

thanks in advance

merofeev commented 6 years ago

Hi @epgeroy, thank you for reporting this issue. Looks like in the version 3.0.0 of docker python package (which was released by docker just yesterday) some incompatible changes to API were made. As a temporary solution please try downgrading docker python package (this action will not downgrade docker itself):

pip install docker==2.7.0

Please let me know if this workaround helps. Meanwhile I will try to fix compatibility of docker-windows-volume-watcher with the new docker python package.

epgeroy commented 6 years ago

Thanks for the short reply, it works when downgrading docker package perfectly. please let us know if there are any changes with this issue. Thanks again.