Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
TG-2.2 Error when browsing tables on admin interface when using PostgreSQL
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  7 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Erni Wogernom  
View profile  
 More options Nov 2 2012, 12:15 pm
From: Erni Wogernom <seofmegw...@gmail.com>
Date: Fri, 2 Nov 2012 09:15:41 -0700 (PDT)
Local: Fri, Nov 2 2012 12:15 pm
Subject: TG-2.2 Error when browsing tables on admin interface when using PostgreSQL

Hi there,

After upgrading to TG-2.2 I noticed the following error (see below) when
browsing pages in admin/ controller like: admin/groups/. The error paper
only when I am using real-db (PostgreSQL) and does not appear when I am
using sqlite.

Any idea how to fix this?

Thanks,

Erni.

Error - <type 'exceptions.TypeError'>: __len__() should return an int
URL: http://127.0.0.1/admin/groups/
File
'/home/erni/prefix/TurboGears-2.2/lib/python2.7/site-packages/WebError-0.10 .3-py2.7.egg/weberror/errormiddleware.py',
line 162 in __call__
  app_iter = self.application(environ, sr_checker)
File
'/home/erni/prefix/TurboGears-2.2/lib/python2.7/site-packages/TurboGears2-2 .2.0-py2.7.egg/tg/configuration/app_config.py',
line 894 in remover
  return app(environ, start_response)
File
'/home/erni/prefix/TurboGears-2.2/lib/python2.7/site-packages/repoze.tm2-1. 0-py2.7.egg/repoze/tm/__init__.py',
line 24 in __call__
  result = self.application(environ, save_status_and_headers)
File
'/home/erni/prefix/TurboGears-2.2/lib/python2.7/site-packages/repoze.who-2. 0-py2.7.egg/repoze/who/middleware.py',
line 87 in __call__
  app_iter = app(environ, wrapper.wrap_start_response)
File
'/home/erni/prefix/TurboGears-2.2/lib/python2.7/site-packages/tw2.core-2.1. 2-py2.7.egg/tw2/core/middleware.py',
line 195 in __call__
  resp = req.get_response(self.app, catch_exc_info=True)
File 'build/bdist.linux-x86_64/egg/webob/request.py', line 1082 in
get_response
File 'build/bdist.linux-x86_64/egg/webob/request.py', line 1055 in
call_application
File
'/home/erni/prefix/TurboGears-2.2/lib/python2.7/site-packages/Beaker-1.6.3- py2.7.egg/beaker/middleware.py',
line 73 in __call__
  return self.app(environ, start_response)
File
'/home/erni/prefix/TurboGears-2.2/lib/python2.7/site-packages/Beaker-1.6.3- py2.7.egg/beaker/middleware.py',
line 155 in __call__
  return self.wrap_app(environ, session_start_response)
File
'/home/erni/prefix/TurboGears-2.2/lib/python2.7/site-packages/Routes-1.13-p y2.7.egg/routes/middleware.py',
line 131 in __call__
  response = self.app(environ, start_response)
File
'/home/erni/prefix/TurboGears-2.2/lib/python2.7/site-packages/Pylons-1.0-py 2.7.egg/pylons/wsgiapp.py',
line 107 in __call__
  response = self.dispatch(controller, environ, start_response)
File
'/home/erni/prefix/TurboGears-2.2/lib/python2.7/site-packages/Pylons-1.0-py 2.7.egg/pylons/wsgiapp.py',
line 312 in dispatch
  return controller(environ, start_response)
File '/home/erni/my_example/my_example.front/my_example/lib/base.py', line
31 in __call__
  return TGController.__call__(self, environ, start_response)
File
'/home/erni/prefix/TurboGears-2.2/lib/python2.7/site-packages/Pylons-1.0-py 2.7.egg/pylons/controllers/core.py',
line 211 in __call__
  response = self._dispatch_call()
File
'/home/erni/prefix/TurboGears-2.2/lib/python2.7/site-packages/Pylons-1.0-py 2.7.egg/pylons/controllers/core.py',
line 162 in _dispatch_call
  response = self._inspect_call(func)
File
'/home/erni/prefix/TurboGears-2.2/lib/python2.7/site-packages/Pylons-1.0-py 2.7.egg/pylons/controllers/core.py',
line 105 in _inspect_call
  result = self._perform_call(func, args)
File
'/home/erni/prefix/TurboGears-2.2/lib/python2.7/site-packages/TurboGears2-2 .2.0-py2.7.egg/tg/controllers/dispatcher.py',
line 127 in _perform_call
  r = self._call(func, params, remainder=remainder)
File
'/home/erni/prefix/TurboGears-2.2/lib/python2.7/site-packages/TurboGears2-2 .2.0-py2.7.egg/tg/controllers/decoratedcontroller.py',
line 143 in _call
  tg_decoration.run_hooks('before_render', remainder, params, output)
File
'/home/erni/prefix/TurboGears-2.2/lib/python2.7/site-packages/TurboGears2-2 .2.0-py2.7.egg/tg/decorators.py',
line 75 in run_hooks
  func(*l, **kw)
File
'/home/erni/prefix/TurboGears-2.2/lib/python2.7/site-packages/TurboGears2-2 .2.0-py2.7.egg/tg/decorators.py',
line 582 in before_render
  paginator.paginate_items_per_page, controller='/')
File
'/home/erni/prefix/TurboGears-2.2/lib/python2.7/site-packages/WebHelpers-1. 3-py2.7.egg/webhelpers/paginate.py',
line 413 in __init__
  self.item_count = len(self.collection)
TypeError: __len__() should return an int


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Fernando González  
View profile  
 More options Nov 5 2012, 11:09 am
From: Fernando González <fernando.gonzal...@gmail.com>
Date: Mon, 5 Nov 2012 08:09:26 -0800 (PST)
Local: Mon, Nov 5 2012 11:09 am
Subject: Re: TG-2.2 Error when browsing tables on admin interface when using PostgreSQL
 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Carlos Daniel Ruvalcaba Valenzuela  
View profile  
 More options Nov 5 2012, 1:48 pm
From: Carlos Daniel Ruvalcaba Valenzuela <clsdan...@gmail.com>
Date: Mon, 5 Nov 2012 11:48:00 -0700
Subject: Re: [TurboGears] Re: TG-2.2 Error when browsing tables on admin interface when using PostgreSQL
Perhaps you can share your shema/models?, I have a related problem
that is triggered by a specific model, not sure what it is, seems like
datetime fields, but I will try to go deep into this afternoon and
would be helpful to check your problems at once (as they seem
related).

Regards,
Carlos Daniel Ruvalcaba Valenzuela

On Mon, Nov 5, 2012 at 9:09 AM, Fernando González


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Carlos Daniel Ruvalcaba Valenzuela  
View profile  
 More options Nov 5 2012, 4:35 pm
From: Carlos Daniel Ruvalcaba Valenzuela <clsdan...@gmail.com>
Date: Mon, 5 Nov 2012 14:34:54 -0700
Local: Mon, Nov 5 2012 4:34 pm
Subject: Re: [TurboGears] Re: TG-2.2 Error when browsing tables on admin interface when using PostgreSQL
This seems to be a problem going back to tgext.crud, seems like the
special paginator that tgext.crud uses does not follow the __len__
protocol strictly and python raises this error.

Normally the length of the list or collection is given as an int, but
I imagine psycopg2 returns a long somewhere and the class
SmartPaginationCollection does not check this and just uses it as is.

I will fill a bug later on github, I already have a working patch but
perhaps this needs some fixing deeper on.

Regards,
Carlos Daniel Ruvalcaba Valenzuela

On Mon, Nov 5, 2012 at 11:48 AM, Carlos Daniel Ruvalcaba Valenzuela


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Erni Wogernom  
View profile  
 More options Nov 5 2012, 5:30 pm
From: Erni Wogernom <seofmegw...@gmail.com>
Date: Mon, 5 Nov 2012 15:30:23 -0700
Local: Mon, Nov 5 2012 5:30 pm
Subject: Re: [TurboGears] Re: TG-2.2 Error when browsing tables on admin interface when using PostgreSQL

  Great, thank you for looking this up Carlos!

  So how can I fix this on my side? Would I be able to do something like:

$ easy_install -U -i
http://www.turbogears.org/2.2/downloads/current/indextg.devtools

  or I will need to get SVN version?

  Thanks again!

Erni.

On Mon, Nov 5, 2012 at 2:34 PM, Carlos Daniel Ruvalcaba Valenzuela <


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Carlos Daniel Ruvalcaba Valenzuela  
View profile  
 More options Nov 5 2012, 6:02 pm
From: Carlos Daniel Ruvalcaba Valenzuela <clsdan...@gmail.com>
Date: Mon, 5 Nov 2012 16:01:56 -0700
Local: Mon, Nov 5 2012 6:01 pm
Subject: Re: [TurboGears] Re: TG-2.2 Error when browsing tables on admin interface when using PostgreSQL

I submitted a pull request to the tag github report, you can in the mean
time pull/download from my fork:

https://github.com/clsdaniel/tgext.crud

And install manually.

python setup.pay install

Regards,
Carlos Daniel Ruvalcaba Valenzuela
El 05/11/2012 15:30, "Erni Wogernom" <seofmegw...@gmail.com> escribió:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Erni Wogernom  
View profile  
 More options Nov 9 2012, 12:51 pm
From: Erni Wogernom <seofmegw...@gmail.com>
Date: Fri, 9 Nov 2012 10:51:49 -0700
Local: Fri, Nov 9 2012 12:51 pm
Subject: Re: [TurboGears] Re: TG-2.2 Error when browsing tables on admin interface when using PostgreSQL

Great, thank you Carlos!

On Mon, Nov 5, 2012 at 4:01 PM, Carlos Daniel Ruvalcaba Valenzuela <


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »