Something pretty odd to me is that you have activated a virtual environment
named "tgenv" but you are actually loading a formencode version from "
/usr/local/lib/python2.7/dist-packages/" which doesn't cite the tgenv.

First of all there shouldn't be any need to create the virtualenv as root,
then try to recreate it with "virtualenv --no-site-packages tgenv" some old
versions of virtualenv did import the distribution wide packages into the
virtualenv by default.

On Sun, Oct 23, 2016 at 1:15 AM, Petr Jakes <[email protected]>
wrote:

> I have installed TG using recommended way on Ubuntu 14.04:
>
> sudo pip install virtualenv
>
> sudo virtualenv tgenv
>
> . tgenv/bin/activate
>
> sudo pip install TurboGears2
>
> sudo pip install tg.devtools
>
> gearbox quickstart movies
>
> cd movies
>
> sudo pip install -e .
>
>
> However starting application ends with following error
>
>
> (tgenv) petr@home-server:~/movies$ gearbox serve
> 01:12:43,038 ERROR [gearbox] Failed to load application or server
> 01:12:43,039 ERROR [gearbox] type object 'NewBase' has no attribute
> '__mutableattributes__'
> Traceback (most recent call last):
>   File "/usr/local/lib/python2.7/dist-packages/gearbox/main.py", line
> 167, in _run_subcommand
>     return cmd.run(parsed_args)
>   File "/usr/local/lib/python2.7/dist-packages/gearbox/command.py", line
> 31, in run
>     self.take_action(parsed_args)
>   File "/usr/local/lib/python2.7/dist-packages/gearbox/commands/serve.py",
> line 254, in take_action
>     relative_to=base, global_conf=parsed_vars)
>   File "/usr/local/lib/python2.7/dist-packages/gearbox/commands/serve.py",
> line 289, in loadapp
>     return loadapp(app_spec, name=name, relative_to=relative_to, **kw)
>   File "/usr/local/lib/python2.7/dist-packages/paste/deploy/loadwsgi.py",
> line 247, in loadapp
>     return loadobj(APP, uri, name=name, **kw)
>   File "/usr/local/lib/python2.7/dist-packages/paste/deploy/loadwsgi.py",
> line 271, in loadobj
>     global_conf=global_conf)
>   File "/usr/local/lib/python2.7/dist-packages/paste/deploy/loadwsgi.py",
> line 296, in loadcontext
>     global_conf=global_conf)
>   File "/usr/local/lib/python2.7/dist-packages/paste/deploy/loadwsgi.py",
> line 320, in _loadconfig
>     return loader.get_context(object_type, name, global_conf)
>   File "/usr/local/lib/python2.7/dist-packages/paste/deploy/loadwsgi.py",
> line 454, in get_context
>     section)
>   File "/usr/local/lib/python2.7/dist-packages/paste/deploy/loadwsgi.py",
> line 476, in _context_from_use
>     object_type, name=use, global_conf=global_conf)
>   File "/usr/local/lib/python2.7/dist-packages/paste/deploy/loadwsgi.py",
> line 406, in get_context
>     global_conf=global_conf)
>   File "/usr/local/lib/python2.7/dist-packages/paste/deploy/loadwsgi.py",
> line 296, in loadcontext
>     global_conf=global_conf)
>   File "/usr/local/lib/python2.7/dist-packages/paste/deploy/loadwsgi.py",
> line 328, in _loadegg
>     return loader.get_context(object_type, name, global_conf)
>   File "/usr/local/lib/python2.7/dist-packages/paste/deploy/loadwsgi.py",
> line 620, in get_context
>     object_type, name=name)
>   File "/usr/local/lib/python2.7/dist-packages/paste/deploy/loadwsgi.py",
> line 646, in find_egg_entry_point
>     possible.append((entry.load(), protocol, entry.name))
>   File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 2088, in
> load
>     entry = __import__(self.module_name, globals(),globals(), ['__name__'])
>   File "/home/petr/movies/movies/config/middleware.py", line 3, in
> <module>
>     from movies.config.app_cfg import base_config
>   File "/home/petr/movies/movies/config/app_cfg.py", line 8, in <module>
>     from tg.configuration import AppConfig
>   File "/usr/local/lib/python2.7/dist-packages/tg/__init__.py", line 52,
> in <module>
>     from tg.controllers import TGController, RestController, redirect,
> url, lurl, abort
>   File "/usr/local/lib/python2.7/dist-packages/tg/controllers/__init__.py",
> line 1, in <module>
>     from tg.controllers.dispatcher import CoreDispatcher
>   File "/usr/local/lib/python2.7/dist-packages/tg/controllers/dispatcher.py",
> line 21, in <module>
>     from tg.decorators import cached_property
>   File "/usr/local/lib/python2.7/dist-packages/tg/decorators.py", line
> 29, in <module>
>     from .validation import _ValidationIntent
>   File "/usr/local/lib/python2.7/dist-packages/tg/validation.py", line 5,
> in <module>
>     from tw2.core import ValidationError as _Tw2ValidationError
>   File "/usr/local/lib/python2.7/dist-packages/tw2/core/__init__.py",
> line 11, in <module>
>     from .widgets import (Widget, CompoundWidget, RepeatingWidget,
>   File "/usr/local/lib/python2.7/dist-packages/tw2/core/widgets.py", line
> 14, in <module>
>     from . import validation as vd
>   File "/usr/local/lib/python2.7/dist-packages/tw2/core/validation.py",
> line 30, in <module>
>     import formencode
>   File "/usr/local/lib/python2.7/dist-packages/formencode/__init__.py",
> line 4, in <module>
>     from formencode.api import (
>   File "/usr/local/lib/python2.7/dist-packages/formencode/api.py", line
> 6, in <module>
>     from . import declarative
>   File "/usr/local/lib/python2.7/dist-packages/formencode/declarative.py",
> line 104, in <module>
>     class Declarative(six.with_metaclass(DeclarativeMeta, object)):
>   File "/usr/lib/python2.7/dist-packages/six.py", line 617, in
> with_metaclass
>     return meta("NewBase", bases, {})
>   File "/usr/local/lib/python2.7/dist-packages/formencode/declarative.py",
> line 71, in __new__
>     for name in cls.__mutableattributes__:
> AttributeError: type object 'NewBase' has no attribute
> '__mutableattributes__'
>
>
> Any hints or comments how to fix it?
>
>
> Thanks
>
> Petr
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "TurboGears" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at https://groups.google.com/group/turbogears.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"TurboGears" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/turbogears.
For more options, visit https://groups.google.com/d/optout.

Reply via email to