You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
since i moved my Plex to another machine I wanted to give this a shot. However I get this result after trying to run it: Got Plex libraries: {"/path": 1, "/path2": 2, "/path3": 3} Adding directories to inotify watch Traceback (most recent call last): File "./plex-inotify.py", line 214, in <module> auto_add=True File "/usr/local/lib/python3.5/dist-packages/pyinotify.py", line 1916, in add_watch exclude_filter) File "/usr/local/lib/python3.5/dist-packages/pyinotify.py", line 1833, in __add_watch wd = self._inotify_wrapper.inotify_add_watch(self._fd, path, mask) File "/usr/local/lib/python3.5/dist-packages/pyinotify.py", line 153, in inotify_add_watch return self._inotify_add_watch(fd, pathname, mask) File "/usr/local/lib/python3.5/dist-packages/pyinotify.py", line 246, in _inotify_add_watch pathname = pathname.encode(sys.getfilesystemencoding()) UnicodeEncodeError: 'utf-8' codec can't encode character '\udcfc' in position 65: surrogates not allowed
Do you have any idea on how to fix this?
The text was updated successfully, but these errors were encountered:
if you're running the script directly from the Synology Task Scheduler (eg : as a triggered event on startup), you should export some variables in order to make python3 work with the correct encoding, in your Task Scheduler userscript must be like this :
It seems that this is actually an issue with pyinotify (which is a library that plex-inotifier uses), and not with plex-inotifier itself. There's an open issue on the pyinotify tracker here:
There's no "official" way for me to set the encoding to UTF8 in my script (aside from unsupported/hacky methods). The environment variable is the way to go, so I'm going to close this issue.
Hello,
since i moved my Plex to another machine I wanted to give this a shot. However I get this result after trying to run it:
Got Plex libraries: {"/path": 1, "/path2": 2, "/path3": 3} Adding directories to inotify watch Traceback (most recent call last): File "./plex-inotify.py", line 214, in <module> auto_add=True File "/usr/local/lib/python3.5/dist-packages/pyinotify.py", line 1916, in add_watch exclude_filter) File "/usr/local/lib/python3.5/dist-packages/pyinotify.py", line 1833, in __add_watch wd = self._inotify_wrapper.inotify_add_watch(self._fd, path, mask) File "/usr/local/lib/python3.5/dist-packages/pyinotify.py", line 153, in inotify_add_watch return self._inotify_add_watch(fd, pathname, mask) File "/usr/local/lib/python3.5/dist-packages/pyinotify.py", line 246, in _inotify_add_watch pathname = pathname.encode(sys.getfilesystemencoding()) UnicodeEncodeError: 'utf-8' codec can't encode character '\udcfc' in position 65: surrogates not allowed
Do you have any idea on how to fix this?
The text was updated successfully, but these errors were encountered: