No :(

There is the same error:

web2py™         Version 1.91.6 (2011-01-30 15:16:26)

Traceback

Traceback (most recent call last):
  File "/home/szimszon_nfs/web2py/gluon/restricted.py", line 188, in
restricted
    exec ccode in environment
  File "/home/szimszon_nfs/web2py/applications/raktar/controllers/
default.py", line 77, in <module>
  File "/home/szimszon_nfs/web2py/gluon/globals.py", line 95, in
<lambda>
    self._caller = lambda f: f()
  File "/home/szimszon_nfs/web2py/applications/raktar/controllers/
default.py", line 52, in user
    return dict( form = auth() )
  File "/home/szimszon_nfs/web2py/gluon/tools.py", line 1034, in
__call__
    return self.login()
  File "/home/szimszon_nfs/web2py/gluon/tools.py", line 1527, in login
    self.log_event(log % self.user)
  File "/home/szimszon_nfs/web2py/gluon/tools.py", line 1277, in
log_event
    origin=origin, user_id=user_id)
  File "/home/szimszon_nfs/web2py/gluon/dal.py", line 3934, in insert
    return self._db._adapter.insert(self,self._listify(fields))
  File "/home/szimszon_nfs/web2py/gluon/dal.py", line 707, in insert
    raise e
ProgrammingError: column "origin" specified more than once
LINE
1: ...t(origin,user_id,description,time_stamp,client_ip,origin,des...
                                                             ^

Error snapshot help

<class 'psycopg2.ProgrammingError'>(column "origin" specified more
than once LINE
1: ...t(origin,user_id,description,time_stamp,client_ip,origin,des...
^ )







File /home/szimszon_nfs/web2py/gluon/dal.py in insert at line 3934

Function argument list

(self=<Table {'origin': <gluon.dal.Field object at 0x9...c>, 'id':
<gluon.dal.Field object at 0x92cdf6c>}>, **fields={'description':
'User 1 Logged-in', 'origin': 'auth', 'user_id': 1})

Code listing

    def _insert(self, **fields):
        return self._db._adapter._insert(self,self._listify(fields))

    def insert(self, **fields):
return self._db._adapter.insert(self,self._listify(fields))


    def bulk_insert(self, items):
        """
        here items is a list of dictionaries

Variables

self._listify   <bound method Table._listify of <Table {'origin'...>,
'id': <gluon.dal.Field object at 0x92cdf6c>}>>
fields  {'description': 'User 1 Logged-in', 'origin': 'auth',
'user_id': 1}
self    <Table {'origin': <gluon.dal.Field object at 0x9...c>, 'id':
<gluon.dal.Field object at 0x92cdf6c>}>
self._db._adapter       <gluon.dal.PostgreSQLAdapter object at 0x921546c>
self._db._adapter.insert        <bound method PostgreSQLAdapter.insert of
<gluon.dal.PostgreSQLAdapter object at 0x921546c>>
self._db        <DAL {'auth_event': <Table {'origin': <gluon.dal... '_id':
<gluon.dal.Field object at 0x94852cc>}>}>





File /home/szimszon_nfs/web2py/gluon/dal.py in insert at line 707

Function argument list

(self=<gluon.dal.PostgreSQLAdapter object at 0x921546c>, table=<Table
{'origin': <gluon.dal.Field object at 0x9...c>, 'id': <gluon.dal.Field
object at 0x92cdf6c>}>, fields=[(<gluon.dal.Field object at
0x92cdeac>, 'auth'), (<gluon.dal.Field object at 0x92cdc2c>, 1),
(<gluon.dal.Field object at 0x92cdf2c>, 'User 1 Logged-in'),
(<gluon.dal.Field object at 0x92cdd4c>, datetime.datetime(2011, 2, 1,
7, 41, 5, 86992)), (<gluon.dal.Field object at 0x92cdc0c>,
'10.1.0.100'), (<gluon.dal.Field object at 0x92cdeac>, 'auth'),
(<gluon.dal.Field object at 0x92cdf2c>, '')])

Code listing

        try:
            self.execute(query)
        except Exception, e:
            if isinstance(e,self.integrity_error_class()):
                return None
raise e

        if hasattr(table,'_primarykey'):
            return dict( [ (k,fields[k]) for k in table._primarykey ])
        id = self.lastrowid(table)
        if not isinstance(id,int):

Variables
e       ProgrammingError('column "origin" specified more... ^\n',)


On febr. 1, 03:07, Massimo Di Pierro <massimo.dipie...@gmail.com>
wrote:
> this should now be fixed in trunk. Please check it.
>
> On Jan 31, 12:46 am, szimszon <szims...@gmail.com> wrote:
>
>
>
>
>
>
>
> > The error is constant...
>
> > After the print statement:
>
> > [(<gluon.dal.Field object at 0x9f9fe8c>, 'auth'), (<gluon.dal.Field
> > object at 0x9f9fc0c>, 1), (<gluon.dal.Field object at 0x9f9ff0c>,
> > 'User 1 Logged-in'), (<gluon.dal.Field object at 0x9f9fd2c>,
> > datetime.datetime(2011, 1, 31, 7, 43, 21, 687801)), (<gluon.dal.Field
> > object at 0x9f9fbec>, '10.1.0.100'), (<gluon.dal.Field object at
> > 0x9f9fe8c>, 'auth'), (<gluon.dal.Field object at 0x9f9ff0c>, '')]
>
> > On jan. 31, 00:18, Massimo Di Pierro <massimo.dipie...@gmail.com>
> > wrote:
>
> > > I cannot reproduce this. Can you help me?
>
> > > Can you edit gluon/dal.py and the function _listify, add a print
> > > statement before it returns. Try reproduce the error. What does it
> > > print?
>
> > > On Jan 30, 11:29 am, szimszon <szims...@gmail.com> wrote:
>
> > > > Now, there is a programming error in nightly build (source version)
> > > > [pgsql]:
>
> > > > Traceback (most recent call last):
> > > >   File "/home/szimszon_nfs/web2py/gluon/restricted.py", line 188, in
> > > > restricted
> > > >     exec ccode in environment
> > > >   File "/home/szimszon_nfs/web2py/applications/raktar/controllers/
> > > > default.py", line 77, in <module>
> > > >   File "/home/szimszon_nfs/web2py/gluon/globals.py", line 95, in
> > > > <lambda>
> > > >     self._caller = lambda f: f()
> > > >   File "/home/szimszon_nfs/web2py/applications/raktar/controllers/
> > > > default.py", line 52, in user
> > > >     return dict( form = auth() )
> > > >   File "/home/szimszon_nfs/web2py/gluon/tools.py", line 1034, in
> > > > __call__
> > > >     return self.login()
> > > >   File "/home/szimszon_nfs/web2py/gluon/tools.py", line 1527, in login
> > > >     self.log_event(log % self.user)
> > > >   File "/home/szimszon_nfs/web2py/gluon/tools.py", line 1277, in
> > > > log_event
> > > >     origin=origin, user_id=user_id)
> > > >   File "/home/szimszon_nfs/web2py/gluon/dal.py", line 3934, in insert
> > > >     return self._db._adapter.insert(self,self._listify(fields))
> > > >   File "/home/szimszon_nfs/web2py/gluon/dal.py", line 707, in insert
> > > >     raise e
> > > > ProgrammingError: column "origin" specified more than once
> > > > LINE
> > > > 1: ...t(origin,user_id,description,time_stamp,client_ip,origin,des...
> > > >                                                              ^
>
> > > > Error snapshot help
>
> > > > <class 'psycopg2.ProgrammingError'>(column "origin" specified more
> > > > than once LINE
> > > > 1: ...t(origin,user_id,description,time_stamp,client_ip,origin,des...
> > > > ^ )
>
> > > > On jan. 30, 16:08, Massimo Di Pierro <massimo.dipie...@gmail.com>
> > > > wrote:
>
> > > > > This should be fixed in trunk (and nightly build).Please give it a try
> > > > > and confirm.
>
> > > > > Massimo
>
> > > > > On Jan 30, 7:46 am, szimszon <szims...@gmail.com> wrote:
>
> > > > > > I wonder if somebody could help me.
>
> > > > > > Here is my Field:
>
> > > > > >     Field( 'updated_by', db.auth_user,
> > > > > >                                         writable = False  )
>
> > > > > > CRUD rendered it in form "None" but the record has a value 1 and I
> > > > > > have user in auth_user.id=1
>
> > > > > > If I modify the Field to:
>
> > > > > >     Field( 'updated_by', db.auth_user,
> > > > > >                                         writable = False ,
> > > > > >                                         requires = IS_EMPTY_OR( 
> > > > > > IS_IN_DB( db, db.auth_user.id, '%
> > > > > > (first_name)s' ) ) )
>
> > > > > > The result is "1" and not the first_name value.
>
> > > > > > If I modify the Field to:
>
> > > > > >     Field( 'updated_by', db.auth_user)
>
> > > > > > The result is a list with all the auth_user rows :-o
>
> > > > > > With the Field like this:
>
> > > > > >     Field( 'updated_by', db.auth_user,
> > > > > >                                         requires = IS_EMPTY_OR( 
> > > > > > IS_IN_DB( db, db.auth_user.id, '%
> > > > > > (first_name)s' ) ) )
>
> > > > > > There is a result list with all the first_name values...
>
> > > > > > Version 1.91.6 (2011-01-03 17:55:14)

Reply via email to