cleobis / alfred-cal

Displays a calendar with Alfred Workflow
MIT License
33 stars 3 forks source link

Not working on macOS 12.4 Monterey #3

Closed LampPrinter closed 2 years ago

LampPrinter commented 2 years ago

https://github.com/oorahduc/alfred-cal This one works but the layout is slightly messed up.

On yours I get this error.

ERROR: Calendar[Script Filter] Code 1: . 16:23:48 workflow.py:2093 DEBUG ---------- Calendar (1.6.0) ---------- 16:23:48 workflow.py:1483 DEBUG reading settings from /Users/XYZ/Library/Application Support/Alfred/Workflow Data/zmin.calendar/settings.json 16:23:48 workflow.py:2394 INFO checking for update ... 16:23:48 background.py:233 DEBUG [workflow_update_check] command cached: /Users/XYZ/Library/Caches/com.runningwithcrayons.Alfred/Workflow Data/zmin.calendar/workflow_update_check.argcache 16:23:48 background.py:237 DEBUG [workflow_update_check] passing job to background runner: ['/Library/Developer/CommandLineTools/usr/bin/python3', '-m', 'workflow.background', 'workflow_update_check'] . 16:23:48 workflow.py:2093 DEBUG ---------- Calendar (1.6.0) ---------- 16:23:48 background.py:243 DEBUG [__workflow_update_check] background job started 16:23:48 format.py:92 INFO Font: System Light 21pt 16:23:48 workflow.py:2114 ERROR Command '['osascript', './textWidth.scpt', 'System Light', '21', ' Su Mo Tu We Th Fr Sa ', '[["", "", "", "1", "2", "3", "4"], ["5", "6", "7", "8", "9", "10", "11"], ["12", "13", "14", "15", "16", "17", "\u2605"], ["19", "20", "21", "22", "23", "24", "25"], ["26", "27", "28", "29", "30", "", ""]]']' returned non-zero exit status 1. Traceback (most recent call last): File "/Users/XYZ/Config - MacOS/Alfred Preferences/Alfred.alfredpreferences/workflows/user.workflow.0A12F45D-E646-4F0F-BA36-E06E664D44FB/workflow/workflow.py", line 2107, in run func(self) File "main.py", line 41, in main texts = cal.get_weeks_text(year, month, self.first_day) File "/Users/XYZ/Config - MacOS/Alfred Preferences/Alfred.alfredpreferences/workflows/user.workflow.0A12F45D-E646-4F0F-BA36-E06E664D44FB/cal.py", line 31, in get_weeks_text texts += format.format(self.get_cal(self.get_weeks(year, month, first_weekday)), texts[-1]) File "/Users/XYZ/Config - MacOS/Alfred Preferences/Alfred.alfredpreferences/workflows/user.workflow.0A12F45D-E646-4F0F-BA36-E06E664D44FB/format.py", line 178, in format return self.formatApp(weeks, title) File "/Users/XYZ/Config - MacOS/Alfred Preferences/Alfred.alfredpreferences/workflows/user.workflow.0A12F45D-E646-4F0F-BA36-E06E664D44FB/format.py", line 195, in formatApp status = subprocess.run(["osascript", "./textWidth.scpt", self.font[0], str(self.font[1]), title, json.dumps(weeks)], File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/subprocess.py", line 516, in run raise CalledProcessError(retcode, process.args, subprocess.CalledProcessError: Command '['osascript', './textWidth.scpt', 'System Light', '21', ' Su Mo Tu We Th Fr Sa ', '[["", "", "", "1", "2", "3", "4"], ["5", "6", "7", "8", "9", "10", "11"], ["12", "13", "14", "15", "16", "17", "\u2605"], ["19", "20", "21", "22", "23", "24", "25"], ["26", "27", "28", "29", "30", "", ""]]']' returned non-zero exit status 1. 16:23:48 workflow.py:2136 DEBUG ---------- finished in 0.295s ---------- [16:23:48.622] Calendar[Script Filter] <?xml version="1.0" encoding="utf-8"?>

Error in workflow 'Calendar'Command '['osascript', './textWidth.scpt', 'System Light', '21', ' Su Mo Tu We Th Fr Sa ', '[["", "", "", "1", "2", "3", "4"], ["5", "6", "7", "8", "9", "10", "11"], ["12", "13", "14", "15", "16", "17", "\\u2605"], ["19", "20", "21", "22", "23", "24", "25"], ["26", "27", "28", "29", "30", "", ""]]']' returned non-zero exit status 1./System/Library/CoreServices/CoreTypes.bundle/Contents/Resources/AlertStopIcon.icns
alexsanjoseph commented 2 years ago

I had to delete and reinstall the existing workflow, after which working fine for me in Monterey.

LampPrinter commented 2 years ago

Apparently if I set the Alfred font theme to "System". It works. I was using "System Light" earlier and it was not working. Can you fix it?

cleobis commented 2 years ago

Does this resolve it? https://github.com/cleobis/alfred-cal/releases/tag/v1.6.3

LampPrinter commented 2 years ago

Yes it does. Thanks.