plugins icon indicating copy to clipboard operation
plugins copied to clipboard

[devto] KeyError

Open geohadab opened this issue 4 years ago • 2 comments

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

geohadab avatar Jan 02 '21 09:01 geohadab

cc @MattiooFR

Kwpolska avatar Jan 02 '21 09:01 Kwpolska

I’ll look info it and let you know

MattiooFR avatar Jan 04 '21 12:01 MattiooFR