[ckan-dev] Module object has no attribute hybridmethod

Brook Elgie brook.elgie at okfn.org
Thu Aug 20 13:04:22 UTC 2015


Looks like your sqlalchemy install is bad. You can try reinstalling, and
making sure there are no stale *.pyc files hanging around.

Brook

On 20 August 2015 at 11:13, gr n8 <gr8 at gmx.at> wrote:

> Hello,
>
> we are faced with a problem - there were not any changes today (or in the
> last weeks), except restarting the server. following stacktrace is printed
> out:
>
> Traceback (most recent call last):
>   File "/usr/share/ckan/default/bin/paster", line 9, in <module>
>     load_entry_point('PasteScript==1.7.5', 'console_scripts', 'paster')()
>   File
> "/usr/share/ckan/default/lib/python2.6/site-packages/paste/script/command.py",
> line 104, in run
>     invoke(command, command_name, options, args[1:])
>   File
> "/usr/share/ckan/default/lib/python2.6/site-packages/paste/script/command.py",
> line 143, in invoke
>     exit_code = runner.run(args)
>   File
> "/usr/share/ckan/default/lib/python2.6/site-packages/paste/script/command.py",
> line 238, in run
>     result = self.command()
>   File
> "/usr/share/ckan/default/lib/python2.6/site-packages/paste/script/serve.py",
> line 284, in command
>     relative_to=base, global_conf=vars)
>   File
> "/usr/share/ckan/default/lib/python2.6/site-packages/paste/script/serve.py",
> line 321, in loadapp
>     **kw)
>   File
> "/usr/share/ckan/default/lib/python2.6/site-packages/paste/deploy/loadwsgi.py",
> line 247, in loadapp
>     return loadobj(APP, uri, name=name, **kw)
>   File
> "/usr/share/ckan/default/lib/python2.6/site-packages/paste/deploy/loadwsgi.py",
> line 271, in loadobj
>     global_conf=global_conf)
>   File
> "/usr/share/ckan/default/lib/python2.6/site-packages/paste/deploy/loadwsgi.py",
> line 296, in loadcontext
>     global_conf=global_conf)
>   File
> "/usr/share/ckan/default/lib/python2.6/site-packages/paste/deploy/loadwsgi.py",
> line 320, in _loadconfig
>     return loader.get_context(object_type, name, global_conf)
>   File
> "/usr/share/ckan/default/lib/python2.6/site-packages/paste/deploy/loadwsgi.py",
> line 454, in get_context
>     section)
>   File
> "/usr/share/ckan/default/lib/python2.6/site-packages/paste/deploy/loadwsgi.py",
> line 476, in _context_from_use
>     object_type, name=use, global_conf=global_conf)
>   File
> "/usr/share/ckan/default/lib/python2.6/site-packages/paste/deploy/loadwsgi.py",
> line 406, in get_context
>     global_conf=global_conf)
>   File
> "/usr/share/ckan/default/lib/python2.6/site-packages/paste/deploy/loadwsgi.py",
> line 296, in loadcontext
>     global_conf=global_conf)
>   File
> "/usr/share/ckan/default/lib/python2.6/site-packages/paste/deploy/loadwsgi.py",
> line 328, in _loadegg
>     return loader.get_context(object_type, name, global_conf)
>   File
> "/usr/share/ckan/default/lib/python2.6/site-packages/paste/deploy/loadwsgi.py",
> line 620, in get_context
>     object_type, name=name)
>   File
> "/usr/share/ckan/default/lib/python2.6/site-packages/paste/deploy/loadwsgi.py",
> line 646, in find_egg_entry_point
>     possible.append((entry.load(), protocol, entry.name))
>   File
> "/usr/share/ckan/default/lib/python2.6/site-packages/pkg_resources/__init__.py",
> line 2355, in load
>     return self.resolve()
>   File
> "/usr/share/ckan/default/lib/python2.6/site-packages/pkg_resources/__init__.py",
> line 2361, in resolve
>     module = __import__(self.module_name, fromlist=['__name__'], level=0)
>   File "/usr/share/ckan/default/src/ckan/ckan/config/middleware.py", line
> 9, in <module>
>     import sqlalchemy as sa
>   File
> "/usr/share/ckan/default/lib/python2.6/site-packages/sqlalchemy/__init__.py",
> line 52, in <module>
>     from sqlalchemy.types import (
>   File
> "/usr/share/ckan/default/lib/python2.6/site-packages/sqlalchemy/types.py",
> line 27, in <module>
>     from sqlalchemy import exc, schema
>   File
> "/usr/share/ckan/default/lib/python2.6/site-packages/sqlalchemy/schema.py",
> line 33, in <module>
>     from sqlalchemy import event, events
>   File
> "/usr/share/ckan/default/lib/python2.6/site-packages/sqlalchemy/event/__init__.py",
> line 7, in <module>
>     from .api import CANCEL, NO_RETVAL, listen, listens_for, remove,
> contains
>   File
> "/usr/share/ckan/default/lib/python2.6/site-packages/sqlalchemy/event/api.py",
> line 13, in <module>
>     from .base import _registrars
>   File
> "/usr/share/ckan/default/lib/python2.6/site-packages/sqlalchemy/event/base.py",
> line 42, in <module>
>     class _Dispatch(object):
>   File
> "/usr/share/ckan/default/lib/python2.6/site-packages/sqlalchemy/event/base.py",
> line 104, in _Dispatch
>     @util.hybridmethod
> AttributeError: 'module' object has no attribute 'hybridmethod'
> (default)[root at localhost ckan]# paster serve
> /etc/ckan/default/production.ini
> Traceback (most recent call last):
>   File "/usr/share/ckan/default/bin/paster", line 9, in <module>
>     load_entry_point('PasteScript==1.7.5', 'console_scripts', 'paster')()
>   File
> "/usr/share/ckan/default/lib/python2.6/site-packages/paste/script/command.py",
> line 104, in run
>     invoke(command, command_name, options, args[1:])
>   File
> "/usr/share/ckan/default/lib/python2.6/site-packages/paste/script/command.py",
> line 143, in invoke
>     exit_code = runner.run(args)
>   File
> "/usr/share/ckan/default/lib/python2.6/site-packages/paste/script/command.py",
> line 238, in run
>     result = self.command()
>   File
> "/usr/share/ckan/default/lib/python2.6/site-packages/paste/script/serve.py",
> line 284, in command
>     relative_to=base, global_conf=vars)
>   File
> "/usr/share/ckan/default/lib/python2.6/site-packages/paste/script/serve.py",
> line 321, in loadapp
>     **kw)
>   File
> "/usr/share/ckan/default/lib/python2.6/site-packages/paste/deploy/loadwsgi.py",
> line 247, in loadapp
>     return loadobj(APP, uri, name=name, **kw)
>   File
> "/usr/share/ckan/default/lib/python2.6/site-packages/paste/deploy/loadwsgi.py",
> line 271, in loadobj
>     global_conf=global_conf)
>   File
> "/usr/share/ckan/default/lib/python2.6/site-packages/paste/deploy/loadwsgi.py",
> line 296, in loadcontext
>     global_conf=global_conf)
>   File
> "/usr/share/ckan/default/lib/python2.6/site-packages/paste/deploy/loadwsgi.py",
> line 320, in _loadconfig
>     return loader.get_context(object_type, name, global_conf)
>   File
> "/usr/share/ckan/default/lib/python2.6/site-packages/paste/deploy/loadwsgi.py",
> line 454, in get_context
>     section)
>   File
> "/usr/share/ckan/default/lib/python2.6/site-packages/paste/deploy/loadwsgi.py",
> line 476, in _context_from_use
>     object_type, name=use, global_conf=global_conf)
>   File
> "/usr/share/ckan/default/lib/python2.6/site-packages/paste/deploy/loadwsgi.py",
> line 406, in get_context
>     global_conf=global_conf)
>   File
> "/usr/share/ckan/default/lib/python2.6/site-packages/paste/deploy/loadwsgi.py",
> line 296, in loadcontext
>     global_conf=global_conf)
>   File
> "/usr/share/ckan/default/lib/python2.6/site-packages/paste/deploy/loadwsgi.py",
> line 328, in _loadegg
>     return loader.get_context(object_type, name, global_conf)
>   File
> "/usr/share/ckan/default/lib/python2.6/site-packages/paste/deploy/loadwsgi.py",
> line 620, in get_context
>     object_type, name=name)
>   File
> "/usr/share/ckan/default/lib/python2.6/site-packages/paste/deploy/loadwsgi.py",
> line 646, in find_egg_entry_point
>     possible.append((entry.load(), protocol, entry.name))
>   File
> "/usr/share/ckan/default/lib/python2.6/site-packages/pkg_resources/__init__.py",
> line 2355, in load
>     return self.resolve()
>   File
> "/usr/share/ckan/default/lib/python2.6/site-packages/pkg_resources/__init__.py",
> line 2361, in resolve
>     module = __import__(self.module_name, fromlist=['__name__'], level=0)
>   File "/usr/share/ckan/default/src/ckan/ckan/config/middleware.py", line
> 9, in <module>
>     import sqlalchemy as sa
>   File
> "/usr/share/ckan/default/lib/python2.6/site-packages/sqlalchemy/__init__.py",
> line 52, in <module>
>     from sqlalchemy.types import (
>   File
> "/usr/share/ckan/default/lib/python2.6/site-packages/sqlalchemy/types.py",
> line 27, in <module>
>     from sqlalchemy import exc, schema
>   File
> "/usr/share/ckan/default/lib/python2.6/site-packages/sqlalchemy/schema.py",
> line 33, in <module>
>     from sqlalchemy import event, events
>   File
> "/usr/share/ckan/default/lib/python2.6/site-packages/sqlalchemy/event/__init__.py",
> line 7, in <module>
>     from .api import CANCEL, NO_RETVAL, listen, listens_for, remove,
> contains
>   File
> "/usr/share/ckan/default/lib/python2.6/site-packages/sqlalchemy/event/api.py",
> line 13, in <module>
>     from .base import _registrars
>   File
> "/usr/share/ckan/default/lib/python2.6/site-packages/sqlalchemy/event/base.py",
> line 42, in <module>
>     class _Dispatch(object):
>   File
> "/usr/share/ckan/default/lib/python2.6/site-packages/sqlalchemy/event/base.py",
> line 104, in _Dispatch
>     @util.hybridmethod
> AttributeError: 'module' object has no attribute 'hybridmethod'
>
>
> I do not have any idea how to fix it - I hope one of you can help me!
>
> Thank you very much!
>
> _______________________________________________
> ckan-dev mailing list
> ckan-dev at lists.okfn.org
> https://lists.okfn.org/mailman/listinfo/ckan-dev
> Unsubscribe: https://lists.okfn.org/mailman/options/ckan-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.okfn.org/pipermail/ckan-dev/attachments/20150820/4cb6913d/attachment-0003.html>


More information about the ckan-dev mailing list