I am trying to run the example provided for TG2 & pyamf (http://
docs.turbogears.org/2.0/TGandPyAMF).
I get the following errors:

1. after setting up the tg2 application when i try to serve it i get
ImportError for "from tg import setup"
<begin stack trace>
(tg2env) D:\projects\tg2\pyamftest>paster serve development.ini --
reload
Starting subprocess with file monitor
Traceback (most recent call last):
  File "D:\tg2env\Scripts\paster-script.py", line 8, in <module>
    load_entry_point('pastescript==1.6.3', 'console_scripts', 'paster')
()
  File "D:\tg2env\lib\site-packages\pastescript-1.6.3-py2.5.egg\paste
\script\command.py", line 79, in run
    invoke(command, command_name, options, args[1:])
  File "D:\tg2env\lib\site-packages\pastescript-1.6.3-py2.5.egg\paste
\script\command.py", line 118, in invoke
    exit_code = runner.run(args)
  File "D:\tg2env\lib\site-packages\pastescript-1.6.3-py2.5.egg\paste
\script\command.py", line 213, in run
    result = self.command()
  File "D:\tg2env\lib\site-packages\pastescript-1.6.3-py2.5.egg\paste
\script\serve.py", line 251, in command
    relative_to=base, global_conf=vars)
  File "D:\tg2env\lib\site-packages\pastescript-1.6.3-py2.5.egg\paste
\script\serve.py", line 278, in loadapp
    **kw)
  File "D:\tg2env\lib\site-packages\pastedeploy-1.3.2-py2.5.egg\paste
\deploy\loadwsgi.py", line 204, in loadapp
    return loadobj(APP, uri, name=name, **kw)
  File "D:\tg2env\lib\site-packages\pastedeploy-1.3.2-py2.5.egg\paste
\deploy\loadwsgi.py", line 224, in loadobj
    global_conf=global_conf)
  File "D:\tg2env\lib\site-packages\pastedeploy-1.3.2-py2.5.egg\paste
\deploy\loadwsgi.py", line 248, in loadcontext
    global_conf=global_conf)
  File "D:\tg2env\lib\site-packages\pastedeploy-1.3.2-py2.5.egg\paste
\deploy\loadwsgi.py", line 278, in _loadconfig
    return loader.get_context(object_type, name, global_conf)
  File "D:\tg2env\lib\site-packages\pastedeploy-1.3.2-py2.5.egg\paste
\deploy\loadwsgi.py", line 409, in get_context
    section)
  File "D:\tg2env\lib\site-packages\pastedeploy-1.3.2-py2.5.egg\paste
\deploy\loadwsgi.py", line 431, in _context_from_use
    object_type, name=use, global_conf=global_conf)
  File "D:\tg2env\lib\site-packages\pastedeploy-1.3.2-py2.5.egg\paste
\deploy\loadwsgi.py", line 361, in get_context
    global_conf=global_conf)
  File "D:\tg2env\lib\site-packages\pastedeploy-1.3.2-py2.5.egg\paste
\deploy\loadwsgi.py", line 248, in loadcontext
    global_conf=global_conf)
  File "D:\tg2env\lib\site-packages\pastedeploy-1.3.2-py2.5.egg\paste
\deploy\loadwsgi.py", line 285, in _loadegg
    return loader.get_context(object_type, name, global_conf)
  File "D:\tg2env\lib\site-packages\pastedeploy-1.3.2-py2.5.egg\paste
\deploy\loadwsgi.py", line 561, in get_context
    object_type, name=name)
  File "D:\tg2env\lib\site-packages\pastedeploy-1.3.2-py2.5.egg\paste
\deploy\loadwsgi.py", line 587, in find_egg_entry_point
    possible.append((entry.load(), protocol, entry.name))
  File "D:\Python25\lib\site-packages\pkg_resources.py", line 1913, in
load
    entry = __import__(self.module_name, globals(),globals(),
['__name__'])
  File "D:\projects\tg2\pyamftest\pyamftest\config\middleware.py",
line 3, in <module>
    from pyamftest.config.environment import load_environment
  File "D:\projects\tg2\pyamftest\pyamftest\config\environment.py",
line 8, in <module>
    from tg import setup
ImportError: cannot import name setup
Exception in thread Thread-1 (most likely raised during interpreter
shutdown):
Traceback (most recent call last):
  File "D:\Python25\Lib\threading.py", line 486, in __bootstrap_inner
  File "D:\Python25\Lib\threading.py", line 446, in run
<end stack trace>

I then comment out the import statement and i am able to serve the
application.

2. When I run the flex client.  I get the following error:
<begin stack trace>
URL: http://127.0.0.1:8080/gateway
File 'D:\\tg2env\\lib\\site-packages\\weberror-0.9-py2.5.egg\\weberror\
\evalexception.py', line 428 in respond
  app_iter = self.application(environ, detect_start_response)
File 'D:\\tg2env\\lib\\site-packages\\turbogears2-1.9.7a4-py2.5.egg\\tg
\\configuration.py', line 358 in remover
  return app(environ, start_response)
File 'D:\\tg2env\\lib\\site-packages\\repoze.tm2-1.0a3-py2.5.egg\
\repoze\\tm\\__init__.py', line 19 in __call__
  result = self.application(environ, save_status_and_headers)
File 'D:\\tg2env\\lib\\site-packages\\toscawidgets-0.9.2-py2.5.egg\\tw\
\core\\middleware.py', line 30 in __call__
  return self.wsgi_app(environ, start_response)
File 'D:\\tg2env\\lib\\site-packages\\paste-1.7.1-py2.5.egg\\paste\
\registry.py', line 350 in __call__
  app_iter = self.application(environ, start_response)
File 'D:\\tg2env\\lib\\site-packages\\toscawidgets-0.9.2-py2.5.egg\\tw\
\core\\middleware.py', line 48 in wsgi_app
  return req.get_response(self.application)(environ, start_response)
File 'build\\bdist.win32\\egg\\webob\\__init__.py', line 1307 in
get_response
File 'build\\bdist.win32\\egg\\webob\\__init__.py', line 1275 in
call_application
File 'D:\\tg2env\\lib\\site-packages\\toscawidgets-0.9.2-py2.5.egg\\tw\
\core\\resource_injector.py', line 56 in _injector
  app_iter = app(environ, determine_response_type)
File 'd:\\tg2env\\lib\\site-packages\\Beaker-1.0.3-py2.5.egg\\beaker\
\middleware.py', line 81 in __call__
  return self.app(environ, start_response)
File 'd:\\tg2env\\lib\\site-packages\\Beaker-1.0.3-py2.5.egg\\beaker\
\middleware.py', line 159 in __call__
  return self.wrap_app(environ, session_start_response)
File 'D:\\tg2env\\lib\\site-packages\\routes-1.10.1-py2.5.egg\\routes\
\middleware.py', line 118 in __call__
  response = self.app(environ, start_response)
File 'D:\\tg2env\\lib\\site-packages\\pylons-0.9.7rc1-py2.5.egg\\pylons
\\wsgiapp.py', line 116 in __call__
  controller = self.resolve(environ, start_response)
File 'D:\\tg2env\\lib\\site-packages\\pylons-0.9.7rc1-py2.5.egg\\pylons
\\wsgiapp.py', line 249 in resolve
  return self.find_controller(controller)
File 'D:\\tg2env\\lib\\site-packages\\turbogears2-1.9.7a4-py2.5.egg\\tg
\\wsgiapp.py', line 19 in find_controller
  root_module_path = self.config['paths']['root']
KeyError: 'paths'
<end stack trace>

Also on the flex client I get the following error:
<begin error>
(mx.rpc.events::FaultEvent)#0
  bubbles = false
  cancelable = true
  currentTarget = (mx.rpc.remoting.mxml::RemoteObject)#1
    channelSet = (mx.messaging::ChannelSet)#2
      authenticated = false
      channelIds = (Array)#3
        [0] (null)
      channels = (Array)#4
        [0] (mx.messaging.channels::AMFChannel)#5
          authenticated = false
          channelSets = (Array)#6
            [0] (mx.messaging::ChannelSet)#2
          connected = false
          connectTimeout = -1
<end error>

I am running tg2 from virtualenv.
Please help as I am a tg2 newbie!

Thanks.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TurboGears" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to