owenwater / alfred-cal Goto Github PK
View Code? Open in Web Editor NEWDisplays a calendar with Alfred Workflow
License: MIT License
Displays a calendar with Alfred Workflow
License: MIT License
Every once in a while, the workflow saves the settings.json file as an empty file / 0 bytes. When this happens, the workflow does not work anymore.
Usually (but not every time), the error occurs when I enter some invalid input, like "cal <fweiuf" , then I add/remove characters from the query string. The error might also occur when I type the input a bit too fast.
When I run the main script via iPython:
In [1]: from main import Main
In [2]: main = Main("")
In [3]: main.execute()
16:18:58 workflow.py:2070 DEBUG Workflow version : 1.2.1
16:18:58 workflow.py:1473 DEBUG Reading settings from `/Users/XXXXX/Library/Application Support/Alfred 2/Workflow Data/zmin.calendar/settings.json` ...
16:18:58 workflow.py:2088 ERROR No JSON object could be decoded
Traceback (most recent call last):
File "workflow/workflow.py", line 2081, in run
func(self)
File "main.py", line 39, in main
self.init_settings()
File "main.py", line 29, in init_settings
self.minus = self.wf.settings.setdefault('minus', self.minus_default)
File "workflow/workflow.py", line 1475, in settings
self._default_settings)
File "workflow/workflow.py", line 900, in __init__
self._load()
File "workflow/workflow.py", line 911, in _load
for key, value in json.load(file_obj, encoding='utf-8').items():
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/__init__.py", line 290, in load
**kw)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/__init__.py", line 351, in loads
return cls(encoding=encoding, **kw).decode(s)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/decoder.py", line 365, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/decoder.py", line 383, in raw_decode
raise ValueError("No JSON object could be decoded")
ValueError: No JSON object could be decoded
16:18:58 workflow.py:2106 DEBUG Workflow finished in 0.009 seconds.
An exception has occurred, use %tb to see the full traceback.
.
And the UI shows:
When I edit the settings.json file to contain an empty JSON object, the workflow starts working again.
Just tried the workflow and got this error:
Starting debug for 'Productivity Time Calendar'
[ERROR: alfred.workflow.input.scriptfilter] Code 1: 10:19:43 workflow.py:1945 DEBUG Workflow version : 1.1.0
10:19:43 workflow.py:1951 ERROR u'alfred.theme.lightlarge'
Traceback (most recent call last):
File "workflow/workflow.py", line 1946, in run
func(self)
File "main.py", line 37, in main
texts = cal.get_weeks_text(year, month)
File "cal.py", line 33, in get_weeks_text
format = Format(self.key, self.path)
File "format.py", line 14, in __init__
self.font = self._load_font(key, path)
File "format.py", line 18, in _load_font
font = pref['themes'][key]['resultTextFont']
KeyError: u'alfred.theme.lightlarge'
10:19:43 workflow.py:1969 DEBUG Workflow finished in 0.106 seconds.
[ERROR: alfred.workflow.input.scriptfilter] Code 1: 10:19:46 workflow.py:1945 DEBUG Workflow version : 1.1.0
10:19:46 workflow.py:1951 ERROR u'alfred.theme.lightlarge'
Traceback (most recent call last):
File "workflow/workflow.py", line 1946, in run
func(self)
File "main.py", line 37, in main
texts = cal.get_weeks_text(year, month)
File "cal.py", line 33, in get_weeks_text
format = Format(self.key, self.path)
File "format.py", line 14, in __init__
self.font = self._load_font(key, path)
File "format.py", line 18, in _load_font
font = pref['themes'][key]['resultTextFont']
KeyError: u'alfred.theme.lightlarge'
10:19:46 workflow.py:1969 DEBUG Workflow finished in 0.372 seconds.
[ERROR: alfred.workflow.input.scriptfilter] Code 1: 10:19:46 workflow.py:1945 DEBUG Workflow version : 1.1.0
10:19:46 workflow.py:1951 ERROR u'alfred.theme.lightlarge'
Traceback (most recent call last):
File "workflow/workflow.py", line 1946, in run
func(self)
File "main.py", line 37, in main
texts = cal.get_weeks_text(year, month)
File "cal.py", line 33, in get_weeks_text
format = Format(self.key, self.path)
File "format.py", line 14, in __init__
self.font = self._load_font(key, path)
File "format.py", line 18, in _load_font
font = pref['themes'][key]['resultTextFont']
KeyError: u'alfred.theme.lightlarge'
10:19:46 workflow.py:1969 DEBUG Workflow finished in 0.107 seconds.
Please update the workflow
https://cl.ly/sHcM/Image%202018-06-14%20at%201.26.46%20PM.png
Hello,
Since I updated Alfred with Catalina, the calendar doesn't work properly...
For instance, if I create a new event on a specific day via Alfred, it'll create it on lots of days instead...
I haven't tried other functions as I don't wish to create a mess in my calendar...
Note that the calendar works perfectly fine on its own...
I really wish you can fix this as I'm a handicap person and using this save me lots of time and energy...
Regards,
Raphaël.
I just installed the workflow earlier today, and it was working fine, I tried it out and every feature was working.
An hour later, while using "<" and ">" to navigate months, I accidentally pressed "=" so my input was "cal sep >>>>>==".
Immediately later I got this error.
Since then, I've tried uninstalling and reinstalling the workflow, but that didn't work.
Using OS X 10.10.4
I just tried the workflow this morning and I got this error:
Starting debug for 'Calendar'
[ERROR: alfred.workflow.input.scriptfilter] Code 1: 09:14:33 workflow.py:1945 DEBUG Workflow version : 1.2.0
09:14:33 workflow.py:1951 ERROR No JSON object could be decoded
Traceback (most recent call last):
File "workflow/workflow.py", line 1946, in run
func(self)
File "main.py", line 37, in main
self.init_settings()
File "main.py", line 27, in init_settings
self.minus = self.wf.settings.setdefault('minus', self.minus_default)
File "workflow/workflow.py", line 1378, in settings
self._default_settings)
File "workflow/workflow.py", line 802, in __init__
self._load()
File "workflow/workflow.py", line 813, in _load
for key, value in json.load(file_obj, encoding='utf-8').items():
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/__init__.py", line 290, in load
**kw)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/__init__.py", line 351, in loads
return cls(encoding=encoding, **kw).decode(s)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/decoder.py", line 365, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/decoder.py", line 383, in raw_decode
raise ValueError("No JSON object could be decoded")
ValueError: No JSON object could be decoded
09:14:33 workflow.py:1969 DEBUG Workflow finished in 0.429 seconds.
Would it be hard to implement an option where the user can make the week start on mondays?
BTW: great workflow, like it a lot.
This is my favorite Alfred workflow!!! Unfortunately, it stopped working when I installed OSX 11. I know that you aren't maintaining it anymore but I'm wondering if you have any advice on how to make it work on Big Sur.
Attempting to use or install this Workflow on Alfred 5 presents the error:
"The selected Workflow contains a very old 3rd party python library incompatible with macOS. Click here to find out how to update."
When you attempt to run the Fixum Workflow, it does not appear to have any effect.
Next Steps:
Do you have a simple fix to allow me to enable this workflow again?
https://www.alfredapp.com/help/troubleshooting/incompatible-python-workflow-library/
As the requirement from @jTux, the workflow is going to support multiple calendar softwares with a new config option.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.