xilopaint / alfred-urban-dictionary Goto Github PK
View Code? Open in Web Editor NEWSearch Urban Dictionary from Alfred.
License: MIT License
Search Urban Dictionary from Alfred.
License: MIT License
ERROR in Workflow
[17:12:03.583] Urban Dictionary[Script Filter] Queuing argument 'LOL'
[17:12:05.016] Urban Dictionary[Script Filter] Script with argv '(null)' finished
[17:12:05.017] ERROR: Urban Dictionary[Script Filter] Code 1: .
17:12:03 workflow.py:2299 DEBUG ---------- Urban Dictionary (2.1.1) ----------
17:12:04 workflow.py:2321 ERROR Expecting value: line 1 column 1 (char 0)
Traceback (most recent call last):
File "/Users/divincem/Library/Mobile Documents/comappleCloudDocs/Sync/Alfred 4/Alfred.alfredpreferences/workflows/user.workflow.7A5D8E36-C63D-4909-BA23-FE8C3F8D3386/workflow/workflow.py", line 2314, in run
func(self)
File "urban_dictionary.py", line 24, in main
data = json.loads(res.read())
File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/json/init.py", line 357, in loads
return _default_decoder.decode(s)
File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/json/decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/json/decoder.py", line 355, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
17:12:05 workflow.py:2345 DEBUG ---------- finished in 1.297s ----------
[17:12:05.021] Urban Dictionary[Script Filter] {
"items": [
{
"title": "Error in workflow 'Urban Dictionary'",
"subtitle": "Expecting value: line 1 column 1 (char 0)",
"valid": false,
"icon": {
"path": "/System/Library/CoreServices/CoreTypes.bundle/Contents/Resources/AlertStopIcon.icns"
}
}
]
}
Is it me, or is it you? :)
[16:13:11.595] Logging Started...
[16:13:16.424] Urban Dictionary[Script Filter] Queuing argument 'jtmc'
[16:13:16.882] Urban Dictionary[Script Filter] Script with argv '(null)' finished
[16:13:16.887] ERROR: Urban Dictionary[Script Filter] Code 1: .
16:13:16 workflow.py:2269 DEBUG ---------- Urban Dictionary (2.2.0) ----------
16:13:16 workflow.py:1675 DEBUG reading settings from /Users/phylyp/Library/Application Support/Alfred/Workflow Data/com.xilopaint.alfredapp.urbandictionary/settings.json
16:13:16 workflow.py:2670 DEBUG update check not due
16:13:16 workflow.py:1897 DEBUG loading cached data: /Users/phylyp/Library/Caches/com.runningwithcrayons.Alfred/Workflow Data/com.xilopaint.alfredapp.urbandictionary/__workflow_latest_version.pickle
16:13:16 workflow.py:2290 ERROR <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:997)>
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/urllib/request.py", line 1348, in do_open
h.request(req.get_method(), req.selector, req.data, headers,
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/http/client.py", line 1282, in request
self._send_request(method, url, body, headers, encode_chunked)
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/http/client.py", line 1328, in _send_request
self.endheaders(body, encode_chunked=encode_chunked)
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/http/client.py", line 1277, in endheaders
self._send_output(message_body, encode_chunked=encode_chunked)
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/http/client.py", line 1037, in _send_output
self.send(msg)
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/http/client.py", line 975, in send
self.connect()
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/http/client.py", line 1454, in connect
self.sock = self._context.wrap_socket(self.sock,
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/ssl.py", line 512, in wrap_socket
return self.sslsocket_class._create(
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/ssl.py", line 1070, in _create
self.do_handshake()
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/ssl.py", line 1341, in do_handshake
self._sslobj.do_handshake()
ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:997)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/phylyp/AlfredSync/Alfred.alfredpreferences/workflows/user.workflow.5BDDCD45-8F90-4B84-8D1F-60CF14ADD08B/workflow/workflow.py", line 2283, in run
func(self)
File "/Users/phylyp/AlfredSync/Alfred.alfredpreferences/workflows/user.workflow.5BDDCD45-8F90-4B84-8D1F-60CF14ADD08B/urban_dictionary.py", line 30, in main
r = web.get(url, params=param)
File "/Users/phylyp/AlfredSync/Alfred.alfredpreferences/workflows/user.workflow.5BDDCD45-8F90-4B84-8D1F-60CF14ADD08B/workflow/web.py", line 580, in get
return request(
File "/Users/phylyp/AlfredSync/Alfred.alfredpreferences/workflows/user.workflow.5BDDCD45-8F90-4B84-8D1F-60CF14ADD08B/workflow/web.py", line 563, in request
return Response(req, stream)
File "/Users/phylyp/AlfredSync/Alfred.alfredpreferences/workflows/user.workflow.5BDDCD45-8F90-4B84-8D1F-60CF14ADD08B/workflow/web.py", line 210, in __init__
self.raw = urllib.request.urlopen(request)
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/urllib/request.py", line 216, in urlopen
return opener.open(url, data, timeout)
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/urllib/request.py", line 525, in open
response = meth(req, response)
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/urllib/request.py", line 634, in http_response
response = self.parent.error(
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/urllib/request.py", line 557, in error
result = self._call_chain(*args)
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/urllib/request.py", line 496, in _call_chain
result = func(*args)
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/urllib/request.py", line 749, in http_error_302
return self.parent.open(new, timeout=req.timeout)
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/urllib/request.py", line 519, in open
response = self._open(req, data)
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/urllib/request.py", line 536, in _open
result = self._call_chain(self.handle_open, protocol, protocol +
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/urllib/request.py", line 496, in _call_chain
result = func(*args)
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/urllib/request.py", line 1391, in https_open
return self.do_open(http.client.HTTPSConnection, req,
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/urllib/request.py", line 1351, in do_open
raise URLError(err)
urllib.error.URLError: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:997)>
16:13:16 workflow.py:2292 INFO for assistance, see: https://github.com/xilopaint/alfred-urban-dictionary
16:13:16 workflow.py:2312 DEBUG ---------- finished in 0.286s ----------
[16:13:16.890] Urban Dictionary[Script Filter] {
"items": [
{
"title": "Error in workflow 'Urban Dictionary'",
"subtitle": "<urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:997)>",
"valid": false,
"icon": {
"path": "/System/Library/CoreServices/CoreTypes.bundle/Contents/Resources/AlertStopIcon.icns"
}
}
]
}
Hi!
I quite like this workflow, it's super handy!
I have a few suggestions that might improve the readability of the results.
Switch the titles and the subtitles to give more importance to the definitions rather than their scoring.
Remove all the [...]
that are associated with links to other UD pages.
Sort the results by their ๐๐ป score (or maybe by the ratio of ๐๐ป / ๐๐ป)
Remove the word you are looking for from the subtitle.
BEFORE:
AFTER:
Cheers,
Fede.
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.