Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> traceback >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
- self = <pyramid.config.actions.ActionState object at 0x7ffb08bc6940>, clear = True
- introspector = <pyramid.registry.Introspector object at 0x7ffb08bc6320>
- def execute_actions(self, clear=True, introspector=None):
- """Execute the configuration actions
- This calls the action callables after resolving conflicts
- For example:
- >>> output = []
- >>> def f(*a, **k):
- ... output.append(('f', a, k))
- >>> context = ActionState()
- >>> context.actions = [
- ... (1, f, (1,)),
- ... (1, f, (11,), {}, ('x', )),
- ... (2, f, (2,)),
- ... ]
- >>> context.execute_actions()
- >>> output
- [('f', (1,), {}), ('f', (2,), {})]
- If the action raises an error, we convert it to a
- ConfigurationExecutionError.
- >>> output = []
- >>> def bad():
- ... bad.xxx
- >>> context.actions = [
- ... (1, f, (1,)),
- ... (1, f, (11,), {}, ('x', )),
- ... (2, f, (2,)),
- ... (3, bad, (), {}, (), 'oops')
- ... ]
- >>> try:
- ... v = context.execute_actions()
- ... except ConfigurationExecutionError, v:
- ... pass
- >>> print(v)
- exceptions.AttributeError: 'function' object has no attribute 'xxx'
- in:
- oops
- Note that actions executed before the error still have an effect:
- >>> output
- [('f', (1,), {}), ('f', (2,), {})]
- The execution is re-entrant such that actions may be added by other
- actions with the one caveat that the order of any added actions must
- be equal to or larger than the current action.
- >>> output = []
- >>> def f(*a, **k):
- ... output.append(('f', a, k))
- ... context.actions.append((3, g, (8,), {}))
- >>> def g(*a, **k):
- ... output.append(('g', a, k))
- >>> context.actions = [
- ... (1, f, (1,)),
- ... ]
- >>> context.execute_actions()
- >>> output
- [('f', (1,), {}), ('g', (8,), {})]
- """
- try:
- all_actions = []
- executed_actions = []
- action_iter = iter([])
- conflict_state = ConflictResolverState()
- while True:
- # We clear the actions list prior to execution so if there
- # are some new actions then we add them to the mix and resolve
- # conflicts again. This orders the new actions as well as
- # ensures that the previously executed actions have no new
- # conflicts.
- if self.actions:
- all_actions.extend(self.actions)
- action_iter = resolveConflicts(
- self.actions, state=conflict_state
- )
- self.actions = []
- action = next(action_iter, None)
- if action is None:
- # we are done!
- break
- callable = action['callable']
- args = action['args']
- kw = action['kw']
- info = action['info']
- # we use "get" below in case an action was added via a ZCML
- # directive that did not know about introspectables
- introspectables = action.get('introspectables', ())
- try:
- if callable is not None:
- > callable(*args, **kw)
- .tox/py36/lib/python3.6/site-packages/pyramid/config/actions.py:308:
- _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
- def register():
- directories = []
- resolver = AssetResolver(self.package_name)
- # defer spec resolution until register to allow for asset
- # overrides to take place in an earlier config phase
- for spec in specs:
- # the trailing slash helps match asset overrides for folders
- if not spec.endswith('/'):
- spec += '/'
- asset = resolver.resolve(spec)
- directory = asset.abspath()
- > if not asset.isdir():
- .tox/py36/lib/python3.6/site-packages/pyramid/config/i18n.py:102:
- _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
- self = <pyramid.path.PkgResourcesAssetDescriptor object at 0x7ffb08aca198>
- def isdir(self):
- > return self.pkg_resources.resource_isdir(self.pkg_name, self.path)
- .tox/py36/lib/python3.6/site-packages/pyramid/path.py:423:
- _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
- self = <pkg_resources.ResourceManager object at 0x7ffb0f01c208>, package_or_requirement = 'kotti', resource_name = 'locale/'
- def resource_isdir(self, package_or_requirement, resource_name):
- """Is the named resource an existing directory?"""
- return get_provider(package_or_requirement).resource_isdir(
- > resource_name
- )
- .tox/py36/lib/python3.6/site-packages/pkg_resources/__init__.py:1131:
- _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
- self = <pkg_resources.NullProvider object at 0x7ffb08aca1d0>, resource_name = 'locale/'
- def resource_isdir(self, resource_name):
- > return self._isdir(self._fn(self.module_path, resource_name))
- .tox/py36/lib/python3.6/site-packages/pkg_resources/__init__.py:1411:
- _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
- self = <pkg_resources.NullProvider object at 0x7ffb08aca1d0>
- path = '/home/davide/workspaces/bddplay/src/bddplay/.tox/py36/lib/python3.6/site-packages/kotti/locale/'
- def _isdir(self, path):
- raise NotImplementedError(
- > "Can't perform this operation for unregistered loader type"
- )
- E NotImplementedError: Can't perform this operation for unregistered loader type
- .tox/py36/lib/python3.6/site-packages/pkg_resources/__init__.py:1454: NotImplementedError
- During handling of the above exception, another exception occurred:
- unresolved_settings = {'kotti.alembic_dirs': 'kotti:alembic', 'kotti.asset_overrides': '', 'kotti.authn_policy_factory': 'kotti.authtkt_factory', 'kotti.authz_policy_factory': 'kotti.acl_factory', ...}
- filedepot = <class 'depot.manager.DepotManager'>
- @fixture
- def setup_app(unresolved_settings, filedepot):
- from kotti import base_configure
- > config = base_configure({}, **unresolved_settings)
- .tox/py36/lib/python3.6/site-packages/kotti/tests/__init__.py:252:
- _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
- .tox/py36/lib/python3.6/site-packages/kotti/__init__.py:240: in base_configure
- config.commit()
- .tox/py36/lib/python3.6/site-packages/pyramid/config/actions.py:152: in commit
- self.action_state.execute_actions(introspector=self.introspector)
- .tox/py36/lib/python3.6/site-packages/pyramid/config/actions.py:315: in execute_actions
- tb,
- .tox/py36/lib/python3.6/site-packages/pyramid/compat.py:178: in reraise
- raise value.with_traceback(tb)
- .tox/py36/lib/python3.6/site-packages/pyramid/config/actions.py:308: in execute_actions
- callable(*args, **kw)
- .tox/py36/lib/python3.6/site-packages/pyramid/config/i18n.py:102: in register
- if not asset.isdir():
- .tox/py36/lib/python3.6/site-packages/pyramid/path.py:423: in isdir
- return self.pkg_resources.resource_isdir(self.pkg_name, self.path)
- .tox/py36/lib/python3.6/site-packages/pkg_resources/__init__.py:1131: in resource_isdir
- resource_name
- .tox/py36/lib/python3.6/site-packages/pkg_resources/__init__.py:1411: in resource_isdir
- return self._isdir(self._fn(self.module_path, resource_name))
- _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
- self = <pkg_resources.NullProvider object at 0x7ffb08aca1d0>
- path = '/home/davide/workspaces/bddplay/src/bddplay/.tox/py36/lib/python3.6/site-packages/kotti/locale/'
- def _isdir(self, path):
- raise NotImplementedError(
- > "Can't perform this operation for unregistered loader type"
- )
- E pyramid.exceptions.ConfigurationExecutionError: <class 'NotImplementedError'>: Can't perform this operation for unregistered loader type
- E in:
- E Line 285 of file /home/davide/workspaces/bddplay/src/bddplay/.tox/py36/lib/python3.6/site-packages/kotti/__init__.py:
- E config.add_translation_dirs("kotti:locale")
- .tox/py36/lib/python3.6/site-packages/pkg_resources/__init__.py:1454: ConfigurationExecutionError
- >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> entering PDB >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
- >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> PDB post_mortem >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
- > /home/davide/workspaces/bddplay/src/bddplay/.tox/py36/lib/python3.6/site-packages/pkg_resources/__init__.py(1454)_isdir()
- -> "Can't perform this operation for unregistered loader type"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement