Hey, just SVN'ed the source, got Turbogears setup, running
your code.
I'm having the same problems Ben was having (in the mailing
list archive
: http://osflash.org/pipermail/flashticle_
osflash.org/2006-May/000009.html).
It seems that the auto-magic reformatting of the output (and
input i'd
guess) is being lost. I can actually go to the following
url:
htt
p://localhost:8080/gateway/HelloWorld/sayHello
and get the following back (in the browser):
Hello from TurboGears!
Just that text.
When i run the 'HelloWorld' demo file, i get this
trackback from the
server (in the cmd window):
2006-07-27 16:19:19,140 cherrypy.msg INFO HTTP: Serving HTTP
on
http://localhost:8080/
2006-07-27 16:19:20,171 turbogears.access INFO 127.0.0.1 - -
"GET
/static/examples/HelloWorld/index.html HTTP/1.1" 304 -
"http://localhost:8080/&qu
ot; "Mozilla/5.0 (
Windows; U; Windows NT 5.1; en-US; rv:1.8.0.5)
Gecko/20060719
Firefox/1.5.0.5"
2006-07-27 16:19:20,358 turbogears.access INFO 127.0.0.1 - -
"POST
/gateway HTTP/1.1" 302 113 ""
"Mozilla/5.0 (Windows; U; Windows NT 5.1;
en-US; rv:1.8.0.5) Ge
cko/20060719 Firefox/1.5.0.5"
2006-07-27 16:19:20,375 turbogears.controllers DEBUG Adding
allow_json
rule: allow_json and (kw.get("tg_format", None)
== "json" or accept
=="text/javascript")
2006-07-27 16:19:20,375 turbogears.controllers DEBUG
Generated rule
kw.get("tg_format", "default") ==
"default"
2006-07-27 16:19:20,375 turbogears.database DEBUG Starting
SQLObject
transaction
2006-07-27 16:19:20,375 turbogears.controllers DEBUG Calling
<function
index at 0x01441A70> with
*((<turbogatewaydemos.controllers.Gateway
object at 0x0145B0F0>
,)), **({})
2006-07-27 16:19:20,375 cherrypy.msg INFO HTTP: Page
handler: <bound
method Gateway.index of
<turbogatewaydemos.controllers.Gateway object at
0x0145B0F0>>
Traceback (most recent call last):
File
"c:\python24\lib\site-packages\CherryPy-2.2.1-py2.
4.egg\cherrypy\_cphttptools.py",
line 105, in _run
self.main()
File
"c:\python24\lib\site-packages\CherryPy-2.2.1-py2.
4.egg\cherrypy\_cphttptools.py",
line 254, in main
body = page_handler(*virtual_path, **self.params)
File "<string>", line 3, in index
File
"c:\python24\lib\site-packages\turbogears-0.9a8-py
2.4.egg\turbogears\controllers.py",
line 331, in expose
output = database.run_with_transaction(
File "<string>", line 5, in
run_with_transaction
File
"c:\python24\lib\site-packages\turbogears-0.9a8-py
2.4.egg\turbogears\database.py",
line 245, in so_rwt
retval = func(*args, **kw)
File "<string>", line 5, in _expose
File
"c:\python24\lib\site-packages\turbogears-0.9a8-py
2.4.egg\turbogears\controllers.py",
line 348, in <lambda>
mapping, fragment, *args, **kw)))
File
"c:\python24\lib\site-packages\turbogears-0.9a8-py
2.4.egg\turbogears\controllers.py",
line 373, in _execute_func
assert isinstance(output, basestring) or
isinstance(output, dict) \
AssertionError: Method Gateway.index() returned unexpected
output.
Output should be of type basestring, dict or generator.
Request Headers:
Content-Length:
ACCEPT-CHARSET: ISO-8859-1,utf-8;q=0.7,*;q=0.7
USER-AGENT: Mozilla/5.0 (Windows; U; Windows NT 5.1;
en-US;
rv:1.8.0.5) Gecko/20060719 Firefox/1.5.0.5
CONNECTION: keep-alive
HOST: localhost:8080
ACCEPT:
text/xml,application/xml,application/xhtml+xml,text/html;q=0
.9,text/plain;q=0.8,image/png,*/*;q=0.5
Remote-Addr: 127.0.0.1
ACCEPT-LANGUAGE: en-us,en;q=0.5
Content-Type:
Remote-Host: 127.0.0.1
ACCEPT-ENCODING: gzip,deflate
KEEP-ALIVE: 300
2006-07-27 16:19:20,375 turbogears.access INFO 127.0.0.1 - -
"GET
/gateway/ HTTP/1.1" 500 2146 ""
"Mozilla/5.0 (Windows; U; Windows NT
5.1; en-US; rv:1.8.0.5) G
ecko/20060719 Firefox/1.5.0.5"
I'm happy to poke around, but i've not used TurboGears,
and my CherryPy
knowledge is pretty rusty - i was using it at 2.0.Anyone
have any
suggestions for where to start? Anybody using flashticle
with the latest
version of TG (9a8)?
Thanks!
j
--
Jos Yule
Digital Hyakugei
_______________________________________________
Flashticle mailing list
Flashticle osflash.org
http://osflash.org/mailman/listinfo/flashticle_osflash
.org
|
On Jul 27, 2006, at 1:25 PM, Jos Yule wrote:
> Hey, just SVN'ed the source, got Turbogears setup,
running your code.
> I'm having the same problems Ben was having (in the
mailing list
> archive
> : http://osflash.org/pipermail/flashticle_osflash.org
/2006-May/
> 000009.html).
>
> It seems that the auto-magic reformatting of the output
(and input i'd
> guess) is being lost. I can actually go to the
following url:
>
> htt
p://localhost:8080/gateway/HelloWorld/sayHello
>
> and get the following back (in the browser):
>
> Hello from TurboGears!
>
> Just that text.
>
> When i run the 'HelloWorld' demo file, i get this
trackback from the
> server (in the cmd window):
It worked with the version of TurboGears it was written
with, but
something must've broken it since. If you dig in and figure
out what
needs to change in order to get it to work with the latest
TurboGears, I'll definitely accept a patch.
-bob
_______________________________________________
Flashticle mailing list
Flashticle osflash.org
http://osflash.org/mailman/listinfo/flashticle_osflash
.org
|