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

KeyError '__deepcopy__' #128

decaz opened this issue Apr 9, 2018 · 2 comments

KeyError '__deepcopy__' #128

decaz opened this issue Apr 9, 2018 · 2 comments


Copy link

@decaz decaz commented Apr 9, 2018

There are several places where deepcopy is used with FeedParserDict instance. It raises KeyError since there is a row copier = getattr(x, "__deepcopy__", None) within copy.deepcopy function:

KeyError: '__deepcopy__'
  File "site-packages/", line 398, in __getattr__
    return self.__getitem__(key)
  File "site-packages/", line 356, in __getitem__
    return dict.__getitem__(self, key)

I have found the old commit ba2e85e but now there is no any check to prevent such a case.

Copy link

@kurtmckee kurtmckee commented Apr 27, 2018

Thanks for reporting this! I'd like to confirm the behavior: is the KeyError happening in code that you've written? Or is it happening while parsing a specific feed? Finally, what version of Python are you using?

Copy link

@decaz decaz commented May 9, 2018

@kurtmckee the KeyError happens while parsing some feeds and unfortunately it's hard to catch it - it's very rare. Sentry says the error is raising at with the following locals:

key = '__deepcopy__'
realkey = '__deepcopy__'
self = {
    'base': '', 
    'language': None, 
    'type': 'text/plain'

I use Python 3.6.4.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants