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: 'table' in manage_ldapplugin #92

Closed
zopyx opened this issue Jan 23, 2020 · 4 comments
Closed

KeyError: 'table' in manage_ldapplugin #92

zopyx opened this issue Jan 23, 2020 · 4 comments
Labels

Comments

@zopyx
Copy link

zopyx commented Jan 23, 2020

Plone 5.2.1. I installed p.p.l 1.7.0 into a fresh Plone site.

manage_ldapplugin give me this:


Traceback (innermost last):
  Module ZPublisher.WSGIPublisher, line 156, in transaction_pubevents
  Module ZPublisher.WSGIPublisher, line 338, in publish_module
  Module ZPublisher.WSGIPublisher, line 256, in publish
  Module ZPublisher.mapply, line 85, in mapply
  Module ZPublisher.WSGIPublisher, line 62, in call_object
  Module zope.browserpage.simpleviewclass, line 41, in __call__
  Module Products.Five.browser.pagetemplatefile, line 126, in __call__
  Module Products.Five.browser.pagetemplatefile, line 61, in __call__
  Module zope.pagetemplate.pagetemplate, line 135, in pt_render
  Module Products.PageTemplates.engine, line 88, in __call__
  Module z3c.pt.pagetemplate, line 173, in render
  Module chameleon.zpt.template, line 306, in render
  Module chameleon.template, line 209, in render
  Module chameleon.utils, line 75, in raise_with_traceback
  Module chameleon.template, line 187, in render
  Module a51d39e12fac4e3e98dcad48339dc59e, line 418, in render
  Module pas.plugins.ldap.properties, line 85, in form
  Module yafowil.yaml.parser, line 23, in parse_from_YAML
  Module yafowil.yaml.parser, line 59, in __call__
  Module yafowil.yaml.parser, line 147, in create_tree
  Module yafowil.yaml.parser, line 145, in create_children
  Module yafowil.yaml.parser, line 144, in create_children
  Module yafowil.yaml.parser, line 122, in call_factory
  Module yafowil.base, line 706, in __call__
  Module yafowil.widget.array.widget, line 72, in array_builder
  Module yafowil.base, line 684, in __call__
KeyError: 'table'

 - Expression: "python:view.form()"
 - Filename:   ... ap-1.7.0-py3.7.egg/pas/plugins/ldap/zmi/manage_plugin.pt
 - Location:   (line 42: col 57)
 - Source:     ... tal:content="structure python:view.form()">
                                          ^^^^^^^^^^^^^^^^^^
 - Arguments:  template: <ViewPageTemplateFile - at 0x7f6d44ed7950>
               options: {...} (0)
               args: <tuple - at 0x7f6d526c7050>
               nothing: <NoneType - at 0x85aec0>
               modules: <_SecureModuleImporter - at 0x7f6d4dbaebd0>
               request: <WSGIRequest - at 0x7f6d423a7390>
               view: <SimpleViewClass from /home/ajung/.buildout/eggs/pas.plugins.ldap-1.7.0-py3.7.egg/pas/plugins/ldap/zmi/manage_plugin.pt manage_ldapplugin at 0x7f6d47ad0c10>
               context: <ImplicitAcquisitionWrapper pasldap at 0x7f6d45e07320>
               views: <ViewMapper - at 0x7f6d4500ed50>
               here: <ImplicitAcquisitionWrapper pasldap at 0x7f6d45e07320>
               container: <ImplicitAcquisitionWrapper pasldap at 0x7f6d45e07320>
               root: <ImplicitAcquisitionWrapper  at 0x7f6d47b1ce60>
               traverse_subpath: <list - at 0x7f6d4565c190>
               user: <ImplicitAcquisitionWrapper - at 0x7f6d45aa4730>
               default: <object - at 0x7f6d514d6fe0>
               repeat: {...} (0)
               loop: {...} (0)
               wrapped_repeat: <SafeMapping - at 0x7f6d47cf2730>
               target_language: <NoneType - at 0x85aec0>
               translate: <function translate at 0x7f6d45912680>
@zopyx zopyx added the bug label Jan 23, 2020
@skillfully
Copy link

Not the same but similar issue in a fresh plone site with
Plone v5.1.4 and different versions of p.p.l v1.5.3, v1.6.2 & v1.7.0 while calling ldap-controlpanel

Please cleanup your egg directory, if you use a buildout:eggs-directory to reuse them

I was able to reproduce the error using PyYAML(3.12) compiled without libyaml support - libyaml-dev was not available.
However, a similar setup including libyaml(-dev) within a docker container does not work. Damn!

2020-01-24 17:07:00 ERROR Zope.SiteErrorLog 1579882020.530.748751739666 http://localhost:8080/Plone/plone_ldapcontrolpanel
Traceback (innermost last):
  Module ZPublisher.Publish, line 138, in publish
  Module ZPublisher.mapply, line 77, in mapply
  Module ZPublisher.Publish, line 48, in call_object
  Module Products.Five.browser.metaconfigure, line 485, in __call__
  Module Products.Five.browser.pagetemplatefile, line 125, in __call__
  Module Products.Five.browser.pagetemplatefile, line 59, in __call__
  Module zope.pagetemplate.pagetemplate, line 137, in pt_render
  Module five.pt.engine, line 98, in __call__
  Module z3c.pt.pagetemplate, line 163, in render
  Module chameleon.zpt.template, line 261, in render
  Module chameleon.template, line 191, in render
  Module chameleon.template, line 171, in render
  Module db611dfd055f6a81e854b79ca965f545.py, line 367, in render
  Module 6e30227d7f0b73559304e04cf1241a3f.py, line 282, in render_master
  Module 58ebaac7e1c0b1d9594edac9832ef051.py, line 1227, in render_master
  Module 6e30227d7f0b73559304e04cf1241a3f.py, line 264, in __fill_content
  Module 58ebaac7e1c0b1d9594edac9832ef051.py, line 458, in render_content
  Module 6e30227d7f0b73559304e04cf1241a3f.py, line 253, in __fill_main
  Module db611dfd055f6a81e854b79ca965f545.py, line 340, in __fill_prefs_configlet_main
  Module pas.plugins.ldap.properties, line 85, in form
  Module yafowil.yaml.parser, line 23, in parse_from_YAML
  Module yafowil.yaml.parser, line 59, in __call__
  Module yafowil.yaml.parser, line 146, in create_tree
  Module yafowil.yaml.parser, line 122, in call_factory
  Module yafowil.base, line 684, in __call__
KeyError: 'form'

 - Expression: "python:view.form()"
 - Filename:   ... 7.egg/pas/plugins/ldap/plonecontrolpanel/controlpanel.pt
 - Location:   (line 35: col 31)
 - Source:     ... form replace="structure python:view.form()" />
                                           ^^^^^^^^^^^^^^^^^^
 - Arguments:  repeat: {...} (0)
               template: <ViewPageTemplateFile - at 0x7fa512cb6850>
               views: <ViewMapper - at 0x7fa512e8ab90>
               modules: <instance - at 0x7fa520220230>
               args: <tuple - at 0x7fa52971b050>
               here: <ImplicitAcquisitionWrapper Plone at 0x7fa51ced0e10>
               user: <ImplicitAcquisitionWrapper - at 0x7fa5161a46e0>
               nothing: <NoneType - at 0x555f3ea8a560>
               container: <ImplicitAcquisitionWrapper Plone at 0x7fa51ced0e10>
               request: <instance - at 0x7fa51509b5f0>
               wrapped_repeat: <SafeMapping - at 0x7fa515f8ac50>
               traverse_subpath: <list - at 0x7fa5161a4b40>
               default: <object - at 0x7fa526726790>
               loop: {...} (0)
               context: <ImplicitAcquisitionWrapper Plone at 0x7fa51ced0e10>
               view: <SimpleViewClass from /var/tmp/buildout/eggs/cp27mu/pas.plugins.ldap-1.7.0-py2.7.egg/pas/plugins/ldap/plonecontrolpanel/controlpanel.pt plone_ldapcontrolpanel at 0x7fa512cb6e90>
               translate: <function translate at 0x7fa512e72b50>
               root: <ImplicitAcquisitionWrapper Zope at 0x7fa514fe57d0>
               options: {...} (0)
               target_language: <NoneType - at 0x555f3ea8a560>

@lheagney
Copy link

lheagney commented Feb 1, 2020

Same issue on freshly installed plone 5.2.1 (Installed with python3) and p.p.l 1.7.0

Clicking on the plone_ldapcontrolpanel generates the following error:

Traceback (innermost last):
  Module ZPublisher.WSGIPublisher, line 156, in transaction_pubevents
  Module ZPublisher.WSGIPublisher, line 338, in publish_module
  Module ZPublisher.WSGIPublisher, line 256, in publish
  Module ZPublisher.mapply, line 85, in mapply
  Module ZPublisher.WSGIPublisher, line 62, in call_object
  Module zope.browserpage.simpleviewclass, line 41, in __call__
  Module Products.Five.browser.pagetemplatefile, line 126, in __call__
  Module Products.Five.browser.pagetemplatefile, line 61, in __call__
  Module zope.pagetemplate.pagetemplate, line 135, in pt_render
  Module Products.PageTemplates.engine, line 88, in __call__
  Module z3c.pt.pagetemplate, line 173, in render
  Module chameleon.zpt.template, line 306, in render
  Module chameleon.template, line 209, in render
  Module chameleon.utils, line 75, in raise_with_traceback
  Module chameleon.template, line 187, in render
  Module 69cc91f407ac8bd99b31e3dfc739de96.py, line 356, in render
  Module 7ad64bdfe577578d280d0a93bebdb894.py, line 286, in render_master
  Module ccd496539b69f40c9d593235ac933d1c.py, line 687, in render_master
  Module 7ad64bdfe577578d280d0a93bebdb894.py, line 266, in __fill_content
  Module ccd496539b69f40c9d593235ac933d1c.py, line 1273, in render_content
  Module 7ad64bdfe577578d280d0a93bebdb894.py, line 257, in __fill_main
  Module 69cc91f407ac8bd99b31e3dfc739de96.py, line 335, in __fill_prefs_configlet_main
  Module pas.plugins.ldap.properties, line 85, in form
  Module yafowil.yaml.parser, line 23, in parse_from_YAML
  Module yafowil.yaml.parser, line 59, in __call__
  Module yafowil.yaml.parser, line 147, in create_tree
  Module yafowil.yaml.parser, line 145, in create_children
  Module yafowil.yaml.parser, line 144, in create_children
  Module yafowil.yaml.parser, line 122, in call_factory
  Module yafowil.base, line 706, in __call__
  Module yafowil.widget.array.widget, line 72, in array_builder
  Module yafowil.base, line 684, in __call__
KeyError: 'table'

 - Expression: "provider:plone.abovecontent"
 - Filename:   ... egg/Products/CMFPlone/browser/templates/main_template.pt
 - Location:   (line 67: col 59)
 - Source:     ...
                                       ^
 - Expression: "context/@@main_template/macros/master"
 - Filename:   ... oducts/CMFPlone/skins/plone_prefs/prefs_main_template.pt
 - Location:   (line 2: col 30)
 - Source:     ... tal:use-macro="context/@@main_template/macros/master">
                                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 - Expression: "context/prefs_main_template/macros/master"
 - Filename:   ... 6.egg/pas/plugins/ldap/plonecontrolpanel/controlpanel.pt
 - Location:   (line 6: col 23)
 - Source:     ... l:use-macro="context/prefs_main_template/macros/master"
                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 - Arguments:  template: <ViewPageTemplateFile - at 0x7f56cfd1d828>
               options: {...} (0)
               args: <tuple - at 0x7f56ed19f048>
               nothing: <NoneType - at 0x88e860>
               modules: <_SecureModuleImporter - at 0x7f56dac24438>
               request: <WSGIRequest - at 0x7f56cd2e4208>
               view: <SimpleViewClass from /home/web/internal-plone5/buildout-cache/eggs/pas.plugins.ldap-1.7.0-py3.6.egg/pas/plugins/ldap/plonecontrolpanel/controlpanel.pt plone_ldapcontrolpanel at 0x7f56cd3d6048>
               context: <ImplicitAcquisitionWrapper Intranet at 0x7f56d2c81090>
               views: <ViewMapper - at 0x7f56cd3d6780>
               here: <ImplicitAcquisitionWrapper Intranet at 0x7f56d2c81090>
               container: <ImplicitAcquisitionWrapper Intranet at 0x7f56d2c81090>
               root: <ImplicitAcquisitionWrapper  at 0x7f56d0491048>
               traverse_subpath: <list - at 0x7f56cd6911c8>
               user: <ImplicitAcquisitionWrapper - at 0x7f56d2b5a750>
               default: <object - at 0x7f56ed19aaa0>
               repeat: {...} (0)
               loop: {...} (0)
               wrapped_repeat: <SafeMapping - at 0x7f56d12c3388>
               target_language: <NoneType - at 0x88e860>
               translate: <function translate at 0x7f56cd35e620>
               macroname: master
2020-02-01 20:03:35,647 INFO    [yafowil.plone:50][waitress] Activate resource 'plone5/widget.css' for group 'yafowil.widget.dict.common' order: '20'
2020-02-01 20:03:35,647 INFO    [yafowil.plone:50][waitress] Activate resource 'plone5/widget.css' for group 'yafowil.widget.array.common' order: '20'
2020-02-01 20:03:35,647 INFO    [yafowil.plone:50][waitress] Activate resource 'yafowil-fontello.css' for group 'yafowil.plone.common' order: '10'
2020-02-01 20:03:35,647 WARNING [yafowil.plone:34][waitress] Skipping resource 'jqueryui/jquery-ui-1.10.3.custom.css' for group 'yafowil.plone.jqueryui'
2020-02-01 20:03:35,659 INFO    [yafowil.plone:50][waitress] Activate resource 'widget.js' for group 'yafowil.widget.dict.common' order: '20'
2020-02-01 20:03:35,659 INFO    [yafowil.plone:50][waitress] Activate resource 'widget.js' for group 'yafowil.widget.array.common' order: '20'
2020-02-01 20:03:35,660 WARNING [yafowil.plone:34][waitress] Skipping resource 'jquery.migrate-1.2.1.min.js' for group 'yafowil.plone.jqueryui'
2020-02-01 20:03:35,660 WARNING [yafowil.plone:34][waitress] Skipping resource 'jqueryui/jquery-ui-1.10.3.custom.min.js' for group 'yafowil.plone.jqueryui

al45tair added a commit to al45tair/pas.plugins.ldap that referenced this issue Feb 20, 2020
Without doing this, various built-in widgets aren't registered, which
results in mysterious KeyError messages when people try to configure
LDAP in Plone.

Fixes collective#97 and collective#92.
@rnixx rnixx closed this as completed Feb 21, 2020
@NicolasGoeddel
Copy link

I still get this error with version 1.7.2:

2020-04-17 17:04:35,849 ERROR   [Zope.SiteErrorLog:251][waitress] 1587135875.82778550.43048125461762743 https://c2.dev.example.com/plone_ldapcontrolpanel
Traceback (innermost last):
  Module ZPublisher.WSGIPublisher, line 156, in transaction_pubevents
  Module ZPublisher.WSGIPublisher, line 338, in publish_module
  Module ZPublisher.WSGIPublisher, line 256, in publish
  Module ZPublisher.mapply, line 85, in mapply
  Module ZPublisher.WSGIPublisher, line 62, in call_object
  Module zope.browserpage.simpleviewclass, line 41, in __call__
  Module Products.Five.browser.pagetemplatefile, line 126, in __call__
  Module Products.Five.browser.pagetemplatefile, line 61, in __call__
  Module zope.pagetemplate.pagetemplate, line 135, in pt_render
  Module Products.PageTemplates.engine, line 88, in __call__
  Module z3c.pt.pagetemplate, line 173, in render
  Module chameleon.zpt.template, line 306, in render
  Module chameleon.template, line 209, in render
  Module chameleon.utils, line 75, in raise_with_traceback
  Module chameleon.template, line 187, in render
  Module b8686247cb597396510019f4b5749b58.py, line 356, in render
  Module 6a21425a92445a02daa74ab028edd8e9.py, line 286, in render_master
  Module 18f95f81fe96c01c615d268b1498c51e.py, line 687, in render_master
  Module 6a21425a92445a02daa74ab028edd8e9.py, line 266, in __fill_content
  Module 18f95f81fe96c01c615d268b1498c51e.py, line 1273, in render_content
  Module 6a21425a92445a02daa74ab028edd8e9.py, line 257, in __fill_main
  Module b8686247cb597396510019f4b5749b58.py, line 335, in __fill_prefs_configlet_main
  Module pas.plugins.ldap.properties, line 86, in form
  Module yafowil.yaml.parser, line 23, in parse_from_YAML
  Module yafowil.yaml.parser, line 59, in __call__
  Module yafowil.yaml.parser, line 146, in create_tree
  Module yafowil.yaml.parser, line 122, in call_factory
  Module yafowil.base, line 684, in __call__
KeyError: 'form'

 - Expression: "provider:plone.abovecontent"
 - Filename:   ... egg/Products/CMFPlone/browser/templates/main_template.pt
 - Location:   (line 67: col 59)
 - Source:     ... 
                                       ^
 - Expression: "context/@@main_template/macros/master"
 - Filename:   ... oducts/CMFPlone/skins/plone_prefs/prefs_main_template.pt
 - Location:   (line 2: col 30)
 - Source:     ... tal:use-macro="context/@@main_template/macros/master">
                                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 - Expression: "context/prefs_main_template/macros/master"
 - Filename:   ... 6.egg/pas/plugins/ldap/plonecontrolpanel/controlpanel.pt
 - Location:   (line 6: col 23)
 - Source:     ... l:use-macro="context/prefs_main_template/macros/master"
                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 - Arguments:  template: <ViewPageTemplateFile - at 0x7f2114a0c5c0>
               options: {...} (0)
               args: <tuple - at 0x7f2130963048>
               nothing: <NoneType - at 0x9d4380>
               modules: <_SecureModuleImporter - at 0x7f2126ab7cf8>
               request: <WSGIRequest - at 0x7f21149b1ba8>
               view: <SimpleViewClass from /home/htwdev/plone/buildout-cache/eggs/pas.plugins.ldap-1.7.2-py3.6.egg/pas/plugins/ldap/plonecontrolpanel/controlpanel.pt plone_ldapcontrolpanel at 0x7f21149e63c8>
               context: <ImplicitAcquisitionWrapper htw at 0x7f211aca4678>
               views: <ViewMapper - at 0x7f2114a52278>
               here: <ImplicitAcquisitionWrapper htw at 0x7f211aca4678>
               container: <ImplicitAcquisitionWrapper htw at 0x7f211aca4678>
               root: <ImplicitAcquisitionWrapper  at 0x7f211909c828>
               traverse_subpath: <list - at 0x7f2114aace88>
               user: <ImplicitAcquisitionWrapper - at 0x7f211aa68360>
               default: <object - at 0x7f213095bb70>
               repeat: {...} (0)
               loop: {...} (0)
               wrapped_repeat: <SafeMapping - at 0x7f2114aa75c8>
               target_language: <NoneType - at 0x9d4380>
               translate: <function translate at 0x7f211554a378>
               macroname: master

This is not a virgin Plone. There was already content added and 4 developers are heavily working on a custom egg. How can I get rid of the KeyError. I was not able to find the fix through the linked commit. It seems that commit just adds an import line but that happened already in my version.

@NicolasGoeddel
Copy link

Somehow it seems solved now. A colleague installed an other extension and know also the ldap configuration works flawlessly. Weird...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants