Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does not work if there is a blank description #4

Open
cdgriffith opened this issue Nov 19, 2018 · 6 comments
Open

Does not work if there is a blank description #4

cdgriffith opened this issue Nov 19, 2018 · 6 comments

Comments

@cdgriffith
Copy link

https://github.com/TitorX/Postdown/blob/master/postdown/parser.py#L21

Should be updated to use .get('description', '')

@jonasbn
Copy link

jonasbn commented Feb 26, 2019

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'

@samcrane8
Copy link
Contributor

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.

@askme-gpt
Copy link

askme-gpt commented Jun 11, 2020

I solved this bug ,and become it a pip package. https://github.com/ShuiPingYang/YspPostdown

@Gauhar
Copy link

Gauhar commented Jul 7, 2021

@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']
        )

@jonasbn
Copy link

jonasbn commented Jul 9, 2021

@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).

@davidnierman
Copy link

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'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants