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

[devto] KeyError #369

Open
geohadab opened this issue Jan 2, 2021 · 2 comments
Open

[devto] KeyError #369

geohadab opened this issue Jan 2, 2021 · 2 comments

Comments

@geohadab
Copy link

geohadab commented Jan 2, 2021

I am trying to publish articles on devto website but I get the following error

LOGGER.info('Published {} to {}'.format(post.meta('slug'), m_post['url'])) KeyError: 'url'

I investigated and found that this error occurs in this line of pydevto.py

 m_post = api.create_article(
                    title=post.title(),
                    body_markdown=content,
                    published=True,
                    canonical_url=post.permalink(absolute=True),
                    tags=post.tags
                )
                #! added
                print(m_post, type(m_post))

when I printed the returned values and its type I get
{'error': 'article param must be a JSON object. You provided article as a NilClass', 'status': 422} <class 'dict'>
for more information about this error click

@Kwpolska
Copy link
Member

Kwpolska commented Jan 2, 2021

cc @MattiooFR

@MattiooFR
Copy link
Contributor

I’ll look info it and let you know

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

3 participants