dsoprea / PyInotify

An efficient and elegant inotify (Linux filesystem activity monitor) library for Python. Python 2 and 3 compatible.
GNU General Public License v2.0
246 stars 74 forks source link

InotifyTrees raises exception in log call for bytes argument (expecting str) #25

Closed my1es closed 7 years ago

my1es commented 7 years ago

Reproduce:

from inotify.adapters import InotifyTrees

inots = InotifyTrees([
    b"something/",
    b"else/"
])

Results in:

Traceback (most recent call last):
  File "demo.py", line 4, in <module>
    b"output_files"
  File "/home/myles/software/conda/envs/dev35/lib/python3.5/site-packages/inotify/adapters.py", line 261, in __init__
    self.__load_trees(paths)
  File "/home/myles/software/conda/envs/dev35/lib/python3.5/site-packages/inotify/adapters.py", line 264, in __load_trees
    _LOGGER.debug("Adding initial watches on trees: [%s]", ",".join(paths))
TypeError: sequence item 0: expected str instance, bytes found
davidparsson commented 7 years ago

I'm having this issue as well.

@dsoprea, what are the chances that there will be a release including this (PR #26) anytime soon?