Trying to save the model in freshly quickstarted project I got an exception. (See below).
Here's what I did:
- Installed TurboGears 1.0b1 on Windows
- Created a project with identity titled "foobar"
- Changed to the "foobar" directory, started "tg-admin toolbox"
- Started the model designer
- Created a class called "Foo"
- Called "Save Current Session"
- Looked at the log, saw the exception
2006-09-10 21:01:04,421 turbogears.controllers DEBUG Calling <function save_stat
e at 0x015F0AB0> with *((<turbogears.toolbox.designer.Designer object at 0x015EE
3D0>, u'{"name":"foobar", "models":{"Foo":{"name":"Foo", "parent_class":"SQLObje
ct", "table_name":"", "id_name":"", "columns":{}, "relations":{}}}, "ordered_mod
els":[]}')), **({'name': u'foo'})
10/Sep/2006:21:01:04 HTTP INFO Page handler: <function _wrapper at 0x0170C0F0>
Traceback (most recent call last):
File "c:\python24\lib\site-packages\CherryPy-2.2.1-py2.4.egg\cherrypy\_cphttpt
ools.py", line 105, in _run
self.main()
File "c:\python24\lib\site-packages\CherryPy-2.2.1-py2.4.egg\cherrypy\_cphttpt
ools.py", line 254, in main
body = page_handler(*virtual_path, **self.params)
File "c:\python24\lib\site-packages\TurboGears-1.0b1-py2.4.egg\turbogears\iden
tity\conditions.py", line 275, in _wrapper
return fn( *args, **kw )
File "<string>", line 3, in save_state
File "c:\python24\lib\site-packages\TurboGears-1.0b1-py2.4.egg\turbogears\cont
rollers.py", line 326, in expose
output = database.run_with_transaction(
File "<string>", line 5, in run_with_transaction
File "c:\python24\lib\site-packages\TurboGears-1.0b1-py2.4.egg\turbogears\data
base.py", line 246, in so_rwt
retval = func(*args, **kw)
File "<string>", line 5, in _expose
File "c:\python24\lib\site-packages\TurboGears-1.0b1-py2.4.egg\turbogears\cont
rollers.py", line 343, in <lambda>
mapping, fragment, args, kw)))
File "c:\python24\lib\site-packages\TurboGears-1.0b1-py2.4.egg\turbogears\cont
rollers.py", line 367, in _execute_func
output = errorhandling.try_call(func, *args, **kw)
File "c:\python24\lib\site-packages\TurboGears-1.0b1-py2.4.egg\turbogears\erro
rhandling.py", line 71, in try_call
return func(self, *args, **kw)
File "c:\python24\lib\site-packages\TurboGears-1.0b1-py2.4.egg\turbogears\tool
box\designer\__init__.py", line 215, in save_state
if name != session_file_name: name = self.save_session_as_name(name)
File "c:\python24\lib\site-packages\TurboGears-1.0b1-py2.4.egg\turbogears\tool
box\designer\__init__.py", line 204, in save_session_as_name
name = name.translate(string.maketrans('',''), string.punctuation)
TypeError: translate() takes exactly one argument (2 given)
Request Headers:
COOKIE: tg-visit=2b777b57c302f63e302d9a0b20a8a357c648471b
Content-Length: 175
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.6) Gecko/
20060728 Firefox/1.5.0.6
CONNECTION: keep-alive
PRAGMA: no-cache
CONTENT-LENGTH: 175
HOST: localhost:7654
CACHE-CONTROL: no-cache
CONTENT-TYPE: application/x-www-form-urlencoded
ACCEPT: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/pl
ain;q=0.8,image/png,*/*;q=0.5
Remote-Addr: 127.0.0.1
ACCEPT-LANGUAGE: en-us,en;q=0.5
Content-Type: application/x-www-form-urlencoded
Remote-Host: 127.0.0.1
ACCEPT-ENCODING: gzip,deflate
KEEP-ALIVE: 300
127.0.0.1 - - [10/Sep/2006:21:01:04] "POST /designer/save_state HTTP/1.1" 500 27
22 "" "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.6) Gecko/2006072
8 Firefox/1.5.0.6"