nriley / LBOfficeMRU

LaunchBar actions which let you access recent documents in Mac Office 365/2016/2019 applications
https://sabi.net/nriley/software/#launchbar
Apache License 2.0
15 stars 0 forks source link

Does not work. #1

Closed oscargong closed 7 years ago

oscargong commented 7 years ago

Here is the log from console, hope it helps.

default 18:41:45.625996 +0800   LaunchBar   Recent Word Documents (net.sabi.LaunchBar.action.RecentWordDocuments): Script Error: </usr/bin/env python /Users/Oscar/Library/Application Support/LaunchBar/Actions/Recent Word Documents.lbaction/Contents/Scripts/default.py>
Traceback (most recent call last):
  File "/Users/Oscar/Library/Application Support/LaunchBar/Actions/Recent Word Documents.lbaction/Contents/Scripts/default.py", line 14, in <module>
    items += mruservice.items_for_app(APP_NAME, APP_BUNDLE_ID, APP_URL_PREFIX, EXTENSION_TO_ICON_NAME)
  File "/var/folders/q_/w1m4zdp56ps5_hqj8lq7vkl40000gn/T/upload_LBOfficeMRU1DTfwo/LBOfficeMRU 1.0b2/Recent Word Documents.lbaction/Contents/Scripts/mruservice.py", line 51, in items_for_app
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib.py", line 1303, in quote
    return ''.join(map(quoter, s))
KeyError: u'\u9879'
default 18:41:45.626225 +0800   LaunchBar   Recent Word Documents (net.sabi.LaunchBar.action.RecentWordDocuments): Script exited with status: 1

Recent Excel Documents and Recent PowerPoint Documents return similar logs.

nriley commented 7 years ago

Sorry for the delay — I have no idea how I missed this when you filed it!

It looks like the issue is when you save a document on OneDrive with characters such as 项 in it. I just need to encode it in UTF-8 and it is fine.

@OscarGong, give this a shot and let me know if it works: LBOfficeMRU-1.0b3.zip

oscargong commented 7 years ago

Thanks @nriley ! It now works fine.