ankitsultana / subtitle-downloader

A OS X Service to download subtitles in three clicks
http://ankitsultana.com/subtitle-downloader
19 stars 1 forks source link

The action “Run Shell Script” encountered an error. (Mac OS Sierra) #2

Closed 360fun closed 7 years ago

360fun commented 7 years ago

Hi, I love your script but since I installed Mac OS Sierra I get "The action “Run Shell Script” encountered an error." every time I run it.

I investigated and this is the error:

Traceback (most recent call last): File "main_script.py", line 95, in notify.notify("Sub-Downloader: Success!", "Subtitles Found", "The subtitles are stored in a file named \"" + filename + ".srt\"", delay=1, sound=True) File "/Users/Username/.utilities/subtitle-downloader/lib/notify.py", line 11, in notify notification.setUserInfo(userInfo) objc.error: NSInvalidUnarchiveOperationException - Class 'OC_PythonDictionary' has a superclass that supports secure coding, but 'OC_PythonDictionary' overrides -initWithCoder: and does not override +supportsSecureCoding. The class must implement +supportsSecureCoding and return YES to verify that its implementation of -initWithCoder: is secure coding compliant.

Since is not actually used I just disabled the line in order to fix it:

#notification.setUserInfo_(userInfo)

ankitsultana commented 7 years ago

Hi, I love your script ...

Glad to hear that! As for the issue, I just put the entire thing in a try/except block, so should work fine now.

Thanks for reporting the issue!

360fun commented 7 years ago

Great, it works! :D Happy to help! ;)