question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

KeyError: u'data' in SubmitMixin

See original GitHub issue
djc@enrai pmf $ python bot.py
retrieving feed items...
retrieving reddit items (MozillaTech)...
Traceback (most recent call last):
  File "bot.py", line 59, in <module>
    res = submit(api, r, title, link)
  File "bot.py", line 47, in submit
    return api.submit(r, title, url=link)
  File "<string>", line 2, in submit
  File "/usr/lib64/python2.7/site-packages/praw/decorators.py", line 271, in wrap
    return function(*args, **kwargs)
  File "<string>", line 2, in submit
  File "/usr/lib64/python2.7/site-packages/praw/decorators.py", line 177, in require_captcha
    return function(*args, **kwargs)
  File "/usr/lib64/python2.7/site-packages/praw/__init__.py", line 2678, in submit
    url = result['data']['url']
KeyError: u'data'

This has started happening this week. The result value seems to be {u'errors': []}.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:19 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
djccommented, Jun 12, 2016

FWIW, it does look like the link my script is trying to submit is already there.

0reactions
bboecommented, Jun 23, 2016

Thanks @birakattack!

Read more comments on GitHub >

github_iconTop Results From Across the Web

KeyError when I want to increase object and put him to dict
I have userId and I add 1 in the loop, but I recived an error: KeyError: 100 todos = {} data = [...
Read more >
Python KeyError Exceptions and How to Handle Them
In this tutorial, you'll learn how to handle Python KeyError exceptions. They are often caused by a bad key lookup in a dictionary,...
Read more >
What is the Python keyerror? - Educative.io
The keyerror occurs when the key used for a lookup does not exist in the mapping. Consider a phone book that is represented...
Read more >
How to Fix KeyError Exceptions in Python - Rollbar
The Python KeyError is an exception that occurs when an attempt is made to access an item in a dictionary that does not...
Read more >
keyerror in Python – How to Fix Dictionary Error
When working with dictionaries in Python, a KeyError gets raised when you try to access an item that doesn't exist in a Python...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found