Warning: Can't synchronize with repository "(default)" (Unsupported version control system "svn": No module named svn). Look in the Trac log for more information.

Ticket #741 (closed defect: fixed)

Opened 13 years ago

Last modified 12 years ago

Error with AjaxGrid on Toolbox.

Reported by: godoy Owned by: anonymous
Priority: normal Milestone: 0.9a5
Component: CherryPy Version:
Severity: normal Keywords:
Cc:

Description

When opening the toolbox (SVN r.1113), the following error is shown on the console:

{ 09/Apr/2006:20:24:20 HTTP INFO Page handler: <bound method AjaxGridDesc?.update of AjaxGridDesc?(name='Ajax Grid', for_widget=AjaxGrid(name='widget', refresh_text='Update', defaults={'default': 1}, id='ajaxgrid_0'))> Traceback (most recent call last):

File "/usr/lib/python2.4/site-packages/CherryPy-2.2.0-py2.4.egg/cherrypy/_cphttptools.py", line 106, in _run

self.main()

File "/usr/lib/python2.4/site-packages/CherryPy-2.2.0-py2.4.egg/cherrypy/_cphttptools.py", line 255, in main

body = page_handler(*virtual_path, self.params)

File "<string>", line 3, in update File "/home/godoy/desenvolvimento/python/TurboGears/trunk/turbogears/controllers.py", line 206, in expose

output = database.run_with_transaction(expose._expose,func, accept, allow_json, allow_json_from_config,*args, kw)

File "/home/godoy/desenvolvimento/python/TurboGears/trunk/turbogears/database.py", line 216, in run_with_transaction

retval = func(*args, kw)

File "<string>", line 5, in _expose File "/home/godoy/desenvolvimento/python/TurboGears/trunk/turbogears/controllers.py", line 227, in <lambda>

expose._expose.when(rule)(lambda _func, accept, allow_json, allow_json_from_config,*args,kw: _execute_func(

File "/home/godoy/desenvolvimento/python/TurboGears/trunk/turbogears/controllers.py", line 248, in _execute_func

output = errorhandling.try_call(func, *args, kw)

File "/home/godoy/desenvolvimento/python/TurboGears/trunk/turbogears/errorhandling.py", line 71, in try_call

output = func(self, *args, kw)

TypeError?: update() got an unexpected keyword argument 'default' }

Attachments

ajaxgrid_unhandled_keyword.patch Download (515 bytes) - added by Philip Walls 13 years ago.
Patch to fix the reported problem with AjaxGrid

Change History

comment:1 Changed 13 years ago by michele

Strange, working fine here.

Have you tried with a new quickstarted project?

time to sleep...

comment:2 Changed 13 years ago by godoy

Yes. I get the same problem. It is also present in the "test app" I sent to help with ticket #740 to the trunk mailing list.

But, again, I just quickstarted a new app right now and I see the problem here. I'm running svn r.1113 now.

TurboGears 0.9a5dev-r1113
nose 0.8.4
RuleDispatch 0.5a0
setuptools 0.6a11
FormEncode 0.4
cElementTree 1.0.5-20051216
PasteScript 0.5
elementtree 1.2.6
simplejson 1.1
SQLObject 0.7.1dev-r1682
CherryPy 2.2.0
TurboKid 0.9.4dev-r1090
TurboJson 0.9.2dev-r1093
PyProtocols 1.0a0
Cheetah 1.0
PasteDeploy 0.3
Paste 0.5
FormEncode 0.4
kid 0.9
elementtree 1.2.6

comment:3 Changed 13 years ago by alberto

Everything good around here (Mac OS X, Python 2.4.1)

TurboGears 0.9a5dev-r1116
nose 0.8.5
RuleDispatch 0.5a0.dev-r2100
setuptools 0.6a11
FormEncode 0.4
cElementTree 1.0.5-20051216
PasteScript 0.5
elementtree 1.2.6-20050316
simplejson 1.1
SQLObject 0.7.1dev-r1669
CherryPy 2.2.0
TurboKid 0.9.3
TurboJson 0.9.1
PyProtocols 1.0a0dev-r2082
Cheetah 1.0
PasteDeploy 0.4
Paste 0.5
FormEncode 0.4
kid 0.9
elementtree 1.2.6-20050316

comment:4 Changed 13 years ago by alberto

¿Could it be the new Turbo Kid? (0.9.4)

comment:5 Changed 13 years ago by simon

All the recent problems of this kind are being caused by [1073], which means we have become sloppy with our arguments. However I acknowledge there are some cases where we need to call a method outside the normal execution branch (e.g. for error handling). In such cases util.adapt_call() should be used explicitly.

comment:6 Changed 13 years ago by michele

Mmm, I can't see any relationship with TurboKid? but "impossible is nothing (adidas TM)". :D

comment:7 Changed 13 years ago by anonymous

Mmm, I can't see any relationship with TurboKid?? but "impossible is nothing (adidas TM)". :Dç

You're right, just guessing there (from the different revision numbers), sorry.

I thought it might be related to something it was putting in the rendered HTML which broke the JS.

I beg you pardon my stupidity (and lack of proper investigation) :D

Alberto

comment:8 Changed 13 years ago by michele

Hey no problem!

I just abused of your idea to publicize adidas! :D

LOL

comment:9 Changed 13 years ago by godoy

You're messing with my bug! :-) I'll whip you both. Go back to work! :-)

(Well, I have to be in a good mood... I'm 454 km (that's 243 miles for you people that don't use the Internation System units) away from home, after travelling 300 km just today -- I'm driving --, on a link that is 5x slower than mine and a client can't get his network up there in Curitiba... Murphy's Law. :-))

comment:10 Changed 13 years ago by steve@…

I can reproduce this problem under Linux. (mozilla-1.7.12-1.4.2.centos4) I get the same error message.

TurboGears 0.9a4 nose 0.8.6 RuleDispatch? 0.5a0 setuptools 0.6a11 FormEncode 0.4 cElementTree 1.0.5-20051216 PasteScript 0.5 elementtree 1.2.6 simplejson 1.1 SQLObject 0.7.1dev-r1588 CherryPy? 2.2.0 TurboKid? 0.9.3 TurboJson? 0.9.1 PyProtocols? 1.0a0 Cheetah 1.0 PasteDeploy? 0.5 Paste 0.5dev-r4745 FormEncode 0.4 kid 0.9.1 elementtree 1.2.6

comment:11 Changed 13 years ago by godoy

  • Status changed from new to closed
  • Resolution set to fixed

Fixed in the trunk. It looks like this is some kind of browser problem related to JavaScript?. It didn't work with FF 1.5.0.1 and works with 1.5.0.2.

comment:12 Changed 13 years ago by anonymous

Sorry to rock the boat, but I just installed 1.5.0.2 to test and I am still getting the same error.

Here is my "tg-admin info" output again. Hopefully in a more readable format since I have now read about WikiFormatting.

TurboGears 0.9a4
nose 0.8.6
RuleDispatch 0.5a0
setuptools 0.6a11
FormEncode 0.4
cElementTree 1.0.5-20051216
PasteScript 0.5
elementtree 1.2.6
simplejson 1.1
SQLObject 0.7.1dev-r1588
CherryPy 2.2.0
TurboKid 0.9.3
TurboJson 0.9.1
PyProtocols 1.0a0
Cheetah 1.0
PasteDeploy 0.5
Paste 0.5dev-r4745
FormEncode 0.4
kid 0.9.1
elementtree 1.2.6

comment:13 Changed 13 years ago by anonymous

As I said, I'm using the trunk version, what will be 0.9a5 or 0.9... Probably something fixed it indirectly. Can you try a newer version?

I'm running:

TurboGears 0.9a5dev-r1178
nose 0.8.4
RuleDispatch 0.5a0
setuptools 0.6a11
FormEncode 0.5
cElementTree 1.0.5-20051216
PasteScript 0.5
elementtree 1.2.6
simplejson 1.1
SQLObject 0.7.1dev-r1707
CherryPy 2.2.0
TurboKid 0.9.4dev-r1123
TurboJson 0.9.2dev-r1093
PyProtocols 1.0a0
Cheetah 1.0
PasteDeploy 0.3
Paste 0.5
FormEncode 0.5
kid 0.9
elementtree 1.2.6

comment:14 Changed 13 years ago by Philip Walls

  • Status changed from closed to reopened
  • Resolution fixed deleted

I have been having this problem with SVN trunk (from today). I was able to "fix" the widget with the attached patch, and the grid appears to be operating correctly. I'm not sure if this is the proper change as I'm a bit confused about the program flow in this class from the short time I have spent looking at it. Perhaps the patch will give you some hints as to what's happening.

One thing I noticed with my patch is that every time you visit the widget page (not only when you click "Update"), it appends another grid row. I'm not sure if this is intended functionality, as I've never seen this particular widget actually operational until I made this change.

Gentoo Linux, python2.4, Firefox 1.5.0.2

TurboGears 0.9a5dev-r1232
nose 0.8.6
RuleDispatch 0.5a0.dev-r2100
setuptools 0.6a11
FormEncode 0.5.1
cElementTree 1.0.5-20051216
PasteScript 0.5.1
elementtree 1.2.6
simplejson 1.1
SQLObject 0.7.1dev-r1728
CherryPy 2.2.0
TurboKid 0.9.4dev-r1123
TurboJson 0.9.2dev-r1204
PyProtocols 1.0a0
Cheetah 1.0
PasteDeploy 0.5
Paste 0.5
FormEncode 0.5.1
kid 0.9
elementtree 1.2.6

comment:15 Changed 13 years ago by Philip Walls

Also, I tested this patch with Firebug and it gave no errors. The project I used to reproduce the problem and test the patch was a fresh quickstart project.

Changed 13 years ago by Philip Walls

Patch to fix the reported problem with AjaxGrid

comment:16 Changed 13 years ago by Philip Walls

Godoy, here is some extra information that will hopefully help. I located the changeset that introduced this problem: r901

Let me know if there's any other way I can be of assistance. I'll try to track down this error more in depth later today if no fix is immediately apparent to you.

comment:17 Changed 13 years ago by alberto

Hi, sorry for that default param... It was something I added whe I wrote it to test that default params could be sent.

Regarding the update on every reload, it's normal. The thng is that an onload event is chained to body so the grid updates itself on page load. However, the sample controller on the widget browser has a counter that get's incremented on each uppdate hence the incrementing you're getting.

Don't need to worry about that ;)

Commiting you patch soon, thanks!

Alberto

comment:18 Changed 13 years ago by alberto

  • Status changed from reopened to closed
  • Resolution set to fixed

committed at [1240]. Closing the ticket, if problem persist don't hesitate to reopen it. Thanks!

Note: See TracTickets for help on using tickets.