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.

AttributeError: 'Registry' object has no attribute 'keys'

See original GitHub issue

Auto-reviewers: @NiharikaRay @matthewwardrop @earthmancash @danfrankj

I need you assistance with an error I am receiving. I am using the latest knowledge base build on debian with postgres. After a dev server change, I am trying to reinitate the service but the frontend returns me the mentioned error (see below for full error log).

INFO:werkzeug:37.44.7.154 - - [24/Sep/2018 13:26:24] "GET /feed HTTP/1.1" 500 -
Traceback (most recent call last):
  File "/usr/local/lib/python3.5/dist-packages/flask/app.py", line 2309, in __call__
    return self.wsgi_app(environ, start_response)
  File "/usr/local/lib/python3.5/dist-packages/flask/app.py", line 2295, in wsgi_app
    response = self.handle_exception(e)
  File "/usr/local/lib/python3.5/dist-packages/flask/app.py", line 1741, in handle_exception
    reraise(exc_type, exc_value, tb)
  File "/usr/local/lib/python3.5/dist-packages/flask/_compat.py", line 35, in reraise
    raise value
  File "/usr/local/lib/python3.5/dist-packages/flask/app.py", line 2292, in wsgi_app
    response = self.full_dispatch_request()
  File "/usr/local/lib/python3.5/dist-packages/flask/app.py", line 1815, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/usr/local/lib/python3.5/dist-packages/flask/app.py", line 1718, in handle_user_exception
    reraise(exc_type, exc_value, tb)
  File "/usr/local/lib/python3.5/dist-packages/flask/_compat.py", line 35, in reraise
    raise value
  File "/usr/local/lib/python3.5/dist-packages/flask/app.py", line 1813, in full_dispatch_request
    rv = self.dispatch_request()
  File "/usr/local/lib/python3.5/dist-packages/flask/app.py", line 1799, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "/usr/local/lib/python3.5/dist-packages/knowledge_repo/app/models.py", line 194, in __call__
    raise_with_traceback(e)
  File "/usr/local/lib/python3.5/dist-packages/future/utils/__init__.py", line 419, in raise_with_traceback
    raise exc.with_traceback(traceback)
  File "/usr/local/lib/python3.5/dist-packages/knowledge_repo/app/models.py", line 187, in __call__
    return self._route(*args, **kwargs)
  File "/usr/local/lib/python3.5/dist-packages/flask_principal.py", line 199, in _decorated
    rv = f(*args, **kw)
  File "/usr/local/lib/python3.5/dist-packages/knowledge_repo/app/routes/index.py", line 88, in render_feed
    post.tldr = render_post_tldr(post)
  File "/usr/local/lib/python3.5/dist-packages/knowledge_repo/app/utils/render.py", line 31, in render_post_tldr
    return markdown.Markdown(extensions=MARKDOWN_EXTENSTIONS).convert(post.tldr.strip())
  File "/usr/local/lib/python3.5/dist-packages/markdown/core.py", line 100, in __init__
    configs=kwargs.get('extension_configs', {}))
  File "/usr/local/lib/python3.5/dist-packages/markdown/core.py", line 128, in registerExtensions
    ext._extendMarkdown(self)
  File "/usr/local/lib/python3.5/dist-packages/markdown/extensions/__init__.py", line 82, in _extendMarkdown
    self.extendMarkdown(md, {})
  File "/usr/local/lib/python3.5/dist-packages/markdown/extensions/headerid.py", line 85, in extendMarkdown
    if 'attr_list' in md.treeprocessors.keys():
AttributeError: 'Registry' object has no attribute 'keys'

Im not sure where to start with this one. I created a new rep from scratch which is working. Any help appreciated.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:6

github_iconTop GitHub Comments

4reactions
Pixelartistcommented, Sep 25, 2018

Hello @matthewwardrop ,

you are correct. I rebuild the server and replaced the markdown with a lower version and am back in business again. I will leave this bug open for you guys to find out what changed in version 3.

For everyone else who encounters this, uninstall the latest version and add a lower version of the markdown by using:

pip uninstall markdown
pip install 'markdown<3'

This should install version 2.6.11 of markdown.

4reactions
matthewwardropcommented, Sep 24, 2018

@Pixelartist It looks like markdown v3.0 has just been released, which probably is the cause of this problem. Try running pip install markdown<3 and everything will work I expect. We’ll have to take a deeper look at what’s going on here soon, or it will start biting more people!

Read more comments on GitHub >

github_iconTop Results From Across the Web

'NoneType' object has no attribute '_registry' - Python ...
AttributeError : 'NoneType' object has no attribute '_registry'. I didn't find a solution to this error and I need help to get the...
Read more >
ORM object has no attribute '_foreign_keys' - Odoo
Hello people! I am trying to install the training module and after solve some anoying bugs now i face this message: /server/openerp/osv/orm.py", line...
Read more >
"AttributeError: 'NoneType' object has no attribute 'keys'" (#193)
"AttributeError: 'NoneType' object has no attribute 'keys'". name: General Issue (FA) about: Use this template for reporting an anomaly.
Read more >
functools — Higher-order functions and operations on callable ...
Any attributes named in assigned or updated that are missing from the object being wrapped are ignored (i.e. this function will not attempt...
Read more >
Bug 53058 – AttributeError: 'str' object has no attribute 'decode ...
Reproduce: - create a new UCR policy with at least one key,value pair - open udm object that supports settings UCR policy. E.g....
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