Open cdgriffith opened 5 years ago
I observe this issue too, this is the error message.
Traceback (most recent call last):
File "/usr/local/bin/postdown", line 10, in <module>
sys.exit(execute())
File "/usr/local/lib/python2.7/site-packages/postdown/cmdline.py", line 14, in execute
parse(in_file, out_file)
File "/usr/local/lib/python2.7/site-packages/postdown/parser.py", line 34, in parse
doc.block(request['description'])
KeyError: 'description'
I'm currently waiting for TitorX to review my pull request, but in the meantime you can checkout my fork here, it handles this issue.
It's not on pip though so you have to clone the source.
I solved this bug ,and become it a pip package. https://github.com/ShuiPingYang/YspPostdown
@ShuiPingYang - This is still happening for me and I am getting the following error:
File "/opt/homebrew/bin/postdown", line 8, in <module>
sys.exit(execute())
File "/opt/homebrew/lib/python3.9/site-packages/postdown/cmdline.py", line 14, in execute
parse(in_file, out_file)
File "/opt/homebrew/lib/python3.9/site-packages/postdown/parser.py", line 21, in parse
doc.line(collection['info']['description'])
KeyError: 'description'
On parser.py line 21 still expects to have description
rows = get_rows(
request['url']['query'],
['key', 'value', 'description']
)
@Gauhar I think @ShuiPingYang has released a (new) separate package: ysp-postdown
See pypi.org, so this package (Postdown) has not been updated, but there is an alternative (ysp-postdown).
I am getting this error with ysp-postdown
Traceback (most recent call last):
File "/usr/local/bin/ysp_postdown", line 8, in <module>
sys.exit(execute())
File "/usr/local/lib/python3.9/site-packages/ysp_postdown/cmdline.py", line 14, in execute
parse(in_file, out_file)
File "/usr/local/lib/python3.9/site-packages/ysp_postdown/parser.py", line 42, in parse
request = api['request']
KeyError: 'request'
https://github.com/TitorX/Postdown/blob/master/postdown/parser.py#L21
Should be updated to use
.get('description', '')