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

ValueError: No closing quotation #25

Open
Just8Will opened this issue Oct 16, 2019 · 1 comment
Open

ValueError: No closing quotation #25

Just8Will opened this issue Oct 16, 2019 · 1 comment

Comments

@Just8Will
Copy link

Hi,

Watcher fails with the following log file.

2019-10-16 18:55:25.665159 <open file '/home/will/.watcher/jobs.yml', mode 'r' at 0x7ff62c653f60> job1 Exception in thread Thread-1: Traceback (most recent call last): File "/usr/lib/python2.7/threading.py", line 801, in __bootstrap_inner self.run() File "/usr/lib/python2.7/dist-packages/pyinotify.py", line 1505, in run self.loop() File "/usr/lib/python2.7/dist-packages/pyinotify.py", line 1491, in loop self.process_events() File "/usr/lib/python2.7/dist-packages/pyinotify.py", line 1287, in process_events self._default_proc_fun(revent) File "/usr/lib/python2.7/dist-packages/pyinotify.py", line 924, in __call__ return _ProcessEvent.__call__(self, event) File "/usr/lib/python2.7/dist-packages/pyinotify.py", line 644, in __call__ return meth(event) File "/home/will/Watcher/watcher.py", line 268, in process_IN_MOVED_TO self.runCommand(event, False) File "/home/will/Watcher/watcher.py", line 212, in runCommand subprocess.call(shlex.split(command)) File "/usr/lib/python2.7/shlex.py", line 279, in split return list(lex) File "/usr/lib/python2.7/shlex.py", line 269, in next token = self.get_token() File "/usr/lib/python2.7/shlex.py", line 96, in get_token raw = self.read_token() File "/usr/lib/python2.7/shlex.py", line 172, in read_token raise ValueError, "No closing quotation" ValueError: No closing quotation Moved to: /mnt/IcyBox/Videos/RecordedTVShows/World's Deadliest Drivers (2019)/World's Deadliest Drivers (2019) - 2019-10-16 17 30 00 - World's Deadliest Drivers.ts

The jobs.yml file is as shown below:

job1: label: Rename Postprocessed Recorded TV Shows watch: /mnt/IcyBox/Videos/RecordedTVShows exclude: ['/mnt/IcyBox/Videos/RecordedTVShows/.grab', '/mnt/IcyBox/Videos/RecordedTVShows/.stignore'] events: ['create', 'move_to'] options: [] recursive: true command: echo $filename

As you can see All I was trying to do was echo the filename. I did this because the script I was running kept failing so I switched to echo as a debug.
Anything you can do to help with this would be appreicated. Is my jobs.yml incorrect or is this a bug in watcher?

@gregghz
Copy link
Owner

gregghz commented Jan 6, 2022

try putting quotes around $filename:

command: echo "$filename"

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