idpaterson / alfred-wunderlist-workflow

Unbelievably fast task entry in Wunderlist with due dates, reminders, and recurrence
298 stars 8 forks source link

KeyError: 'short' in preferences and tasks with reminders (Australian locale) #127

Closed bellebethcooper closed 7 years ago

bellebethcooper commented 7 years ago

Hello,

Thanks for making this workflow! I really appreciate it :)

I've been unable to run the preferences command in the latest beta or in the latest stable version. I'm currently running 0.6.0-beta4. Here's the debugging log from Alfred when I run the preferences command:

[STDERR: alfred.workflow.input.scriptfilter] Workflow version : 0.6.0-beta.4 The debug log can be found in the log file: /Users/belle/Library/Caches/com.runningwithcrayons.Alfred-2/Workflow Data/com.ipaterson.alfred.wunderlist/com.ipaterson.alfred.wunderlist.log 2016-08-18 14:41:05,090 workflow DEBUG Command arguments cached to /Users/belle/Library/Caches/com.runningwithcrayons.Alfred-2/Workflow Data/com.ipaterson.alfred.wunderlist/sync.argcache 2016-08-18 14:41:05,090 workflow DEBUG Calling [u'/usr/bin/python', '/Users/belle/Library/Application Support/Alfred 2/Alfred.alfredpreferences/workflows/user.workflow.FE235515-BA04-42C8-B2B2-4A558EBC1CD5/workflow/background.pyo', 'sync'] ... The debug log can be found in the log file: /Users/belle/Library/Caches/com.runningwithcrayons.Alfred-2/Workflow Data/com.ipaterson.alfred.wunderlist/com.ipaterson.alfred.wunderlist.log Workflow finished in 0.001 seconds. Workflow finished in 0.002 seconds. 2016-08-18 14:41:05,150 workflow DEBUG Executing task sync in background... 2016-08-18 14:41:05,151 wunderlist INFO Workflow response complete 2016-08-18 14:41:05,151 workflow DEBUG Set last run version : 0.6.0-beta.4 2016-08-18 14:41:05,151 workflow DEBUG Workflow finished in 0.102 seconds. Workflow finished in 0.102 seconds. [ERROR: alfred.workflow.input.scriptfilter] Code 1: Workflow version : 0.6.0-beta.4 The debug log can be found in the log file: /Users/belle/Library/Caches/com.runningwithcrayons.Alfred-2/Workflow Data/com.ipaterson.alfred.wunderlist/com.ipaterson.alfred.wunderlist.log 2016-08-18 14:41:06,976 workflow ERROR 'short' Traceback (most recent call last): File "/Users/belle/Library/Application Support/Alfred 2/Alfred.alfredpreferences/workflows/user.workflow.FE235515-BA04-42C8-B2B2-4A558EBC1CD5/workflow/workflow.py", line 2169, in run func(self) File "alfred-wunderlist-workflow.py", line 16, in main route(wf.args) File "/Users/belle/Library/Application Support/Alfred 2/Alfred.alfredpreferences/workflows/user.workflow.FE235515-BA04-42C8-B2B2-4A558EBC1CD5/wunderlist/handlers/route.py", line 75, in route handler.filter(command) File "/Users/belle/Library/Application Support/Alfred 2/Alfred.alfredpreferences/workflows/user.workflow.FE235515-BA04-42C8-B2B2-4A558EBC1CD5/wunderlist/handlers/preferences.py", line 173, in filter u'⏰ %s Reminders without a specific time will be set to this time' % format_time(prefs.reminder_time, 'short'), File "/Users/belle/Library/Application Support/Alfred 2/Alfred.alfredpreferences/workflows/user.workflow.FE235515-BA04-42C8-B2B2-4A558EBC1CD5/wunderlist/util.py", line 71, in format_time expr = c.locale.timeFormats[format] KeyError: 'short' Workflow finished in 0.063 seconds.

idpaterson commented 7 years ago

Thanks for reporting. It looks like this is a locale-specific issue, would you please send a screenshot of your system's Language & Region preferences screen, as well as the General tab when you click Advanced on the bottom of that preferences screen? Setting up my date and time locale to match yours will help to fix the issue quickly.

bellebethcooper commented 7 years ago

wl-languageregionsettings wl-advancedsettings

Thanks, I've uploaded both screenshots.

I also noticed today that the due section of the workflow was only showing two of the six tasks it should be. I have tasks due/overdue from three lists, and it was showing the tasks from just one of those lists. When I opened up my language/region settings to take the screenshot I noticed my first day of the week was set to Sunday and switched it to Monday, which is what I normally use, and now the due command in the workflow doesn't work at all.

I tried this with the debugger on, and it seems the error is the same as the one I opened this issue for, but let me know if you'd like me to open a new issue for the due tasks problem.

idpaterson commented 7 years ago

Thanks, with those settings I am seeing the same problem and can work on a fix for it. I will update the issue title to more clearly reflect the nature of the problem.

There are still problems with the task syncing tracked in #98. I haven't had much time over the past few months to work on this problem and three or four attempts so far have fallen short, but we are back to the time of year when I have more time available to revisit problems with tasks in certain lists getting out of date.

idpaterson commented 7 years ago

@bellebethcooper, this turned out to be a simple programming error in one of this project's dependencies that broke a few Australian time formats. This will be fixed in today's release.

bellebethcooper commented 7 years ago

Thanks a lot for the quick turnaround!