I think:

1. Run "appcfg.py vacuum_indexes your_app_dir/"
2. Run "appcfg.py update_indexes your_app_dir/"

On Feb 23, 10:23 pm, Miguel Goncalves <[email protected]>
wrote:
> How do I do that?
>
> On Tue, Feb 23, 2010 at 7:09 PM, mdipierro <[email protected]> wrote:
> > I would try delete and rebuild indices.
>
> > On Feb 23, 7:54 pm, Miguel Goncalves <[email protected]>
> > wrote:
> > > Yes I tried to upload it to GAE but I ran into the missing indexes issue.
> > So
> > > I was trying to run the app locally to generate the required indexes and
> > be
> > > able to run on the live GAE. :(
>
> > > I have the issue on the dev server. This used to work and I have no clue
> > > what could have broken it. I believe the only thing I did was to update
> > GAE
> > > to the latest sdk.
>
> > > Debugging the app a little bit further I found the place where the
> > exception
> > > is raised:
>
> > > class Table
> > >  def __delitem__(self, key):
> > >         if not str(key).isdigit() or not self._db(self.id ==
> > key).delete():
> > >             raise SyntaxError, 'No such record: %s' % key
>
> > > However the table does contain a record equal to key.
> > > What  gives?
>
> > > Thanks
> > > Miguel
>
> > > On Tue, Feb 23, 2010 at 11:04 AM, Wes James <[email protected]> wrote:
> > > > Have you uploaded your app to gae and tested it there?
>
> > > > -wes
>
> > > > On Tue, Feb 23, 2010 at 10:57 AM, Miguel Goncalves
> > > > <[email protected]> wrote:
> > > > > Anybody run into a similar issue?
> > > > > I cannot seem to figure it out. :(
>
> > > > > Thanks
> > > > > -Miguel
>
> > > > > On Mon, Feb 22, 2010 at 6:09 PM, Miguel <[email protected]>
> > > > wrote:
>
> > > > >> Hi
>
> > > > >> I implemented the following function to delete an entry in a db:
>
> > > > >> @auth.requires_login()
> > > > >> def DeleteSite():
> > > > >>        msg = T("Cannot delete specified record.")
> > > > >>        try:
> > > > >>                record_id = request.vars['id']
> > > > >>                next_page = request.vars['next']
> > > > >>        except:
> > > > >>                response.flash = msg
> > > > >>                return dict( message=msg)
>
> > > > >>        if record_id is None or next_page is None or len(next_page)
> > == 0:
> > > > >>                response.flash = msg
> > > > >>                return dict( message=msg)
>
> > > > >>        crud.delete(db.sites,record_id,
> > next=URL(r=request,f=next_page))
>
> > > > >> It gets invoked like this (local server on GAE):
> > > > >>http://127.0.0.1:8081/mlinks/default/DeleteSite?id=388&next=MySites
>
> > > > >> This used to work nicely however now when this gets invoked, the
> > item
> > > > >> gets deleted from the database BUT I get a ticket error:
>
> > > > >> Error traceback
>
> > > > >> Traceback (most recent call last):
> > > > >>  File "C:\web2py\gluon\restricted.py", line 173, in restricted
> > > > >>    exec ccode in environment
> > > > >>  File "C:\web2py\applications\mlinks/controllers/
> > > > >> default.py:DeleteSite", line 164, in <module>
> > > > >>  File "C:\web2py\gluon\globals.py", line 96, in <lambda>
> > > > >>    self._caller = lambda f: f()
> > > > >>  File "C:\web2py\gluon\tools.py", line 1848, in f
> > > > >>    return action(*a, **b)
> > > > >>  File "C:\web2py\applications\mlinks/controllers/
> > > > >> default.py:DeleteSite", line 130, in DeleteSite
> > > > >>  File "C:\web2py\gluon\tools.py", line 2377, in delete
> > > > >>    del table[record_id]
> > > > >>  File "C:\web2py\gluon\sql.py", line 1545, in __delitem__
> > > > >>    raise SyntaxError, 'No such record: %s' % key
> > > > >> SyntaxError: No such record: 388
>
> > > > >> Before invoking the delete I made sure the entry I wanted to delete
> > > > >> was indeed in the DB.
> > > > >> After the error the correct entry  has been deleted.
>
> > > > >> It is like the delete is being called twice!
> > > > >> Any idea of what might be causing this?
>
> > > > >> thanks
> > > > >> Miguel
>
> > > > >> --
> > > > >> You received this message because you are subscribed to the Google
> > > > Groups
> > > > >> "web2py-users" group.
> > > > >> To post to this group, send email to [email protected].
> > > > >> To unsubscribe from this group, send email to
> > > > >> [email protected]<web2py%[email protected]>
> > <web2py%[email protected]<web2py%[email protected]>
>
> > > > .
> > > > >> For more options, visit this group at
> > > > >>http://groups.google.com/group/web2py?hl=en.
>
> > > > > --
> > > > > You received this message because you are subscribed to the Google
> > Groups
> > > > > "web2py-users" group.
> > > > > To post to this group, send email to [email protected].
> > > > > To unsubscribe from this group, send email to
> > > > > [email protected]<web2py%[email protected]>
> > <web2py%[email protected]<web2py%[email protected]>
>
> > > > .
> > > > > For more options, visit this group at
> > > > >http://groups.google.com/group/web2py?hl=en.
>
> > > > --
> > > > You received this message because you are subscribed to the Google
> > Groups
> > > > "web2py-users" group.
> > > > To post to this group, send email to [email protected].
> > > > To unsubscribe from this group, send email to
> > > > [email protected]<web2py%[email protected]>
> > <web2py%[email protected]<web2py%[email protected]>
>
> > > > .
> > > > For more options, visit this group at
> > > >http://groups.google.com/group/web2py?hl=en.
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "web2py-users" group.
> > To post to this group, send email to [email protected].
> > To unsubscribe from this group, send email to
> > [email protected]<web2py%[email protected]>
> > .
> > For more options, visit this group at
> >http://groups.google.com/group/web2py?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" 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/web2py?hl=en.

Reply via email to