[web2py] Re: Error in appadmin (database admin) on python 3

2017-08-08 Thread Kirill Shatalaev
#1727 on web2py

понедельник, 7 августа 2017 г., 18:20:30 UTC+4 пользователь Massimo Di 
Pierro написал:
>
> please open a ticket in web2py or pydal, I can fix this in either place.
>
>
>>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: Error in appadmin (database admin) on python 3

2017-08-07 Thread Massimo Di Pierro
please open a ticket in web2py or pydal, I can fix this in either place.

On Sunday, 6 August 2017 10:07:40 UTC-5, Kirill Shatalaev wrote:
>
> Hello, when using python3 and database admin, I got this error:
>
>  name 'unicode' is not defined
>
> You need to click on any table name (for example, 
> http://127.0.0.1:8000/welcome/appadmin/select/db?query=db.auth_user.id%3E0
> ).
>
> I think this is python3 unicode -> str specific related trouble.
>
>
>
>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: Error in appadmin (database admin) on python 3

2017-08-06 Thread Leonel Câmara
Looks like a pyDAL bug, there is no "unicode" in the appadmin.

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: Error in appadmin

2012-09-11 Thread Massimo Di Pierro
Not in web2py. Perhaps in the code you are running?

$ grep '%(first_name)' gluon/*.py
gluon/tools.py:user_identifier = '%(first_name)s'
gluon/tools.py:return '%(first_name)s %(last_name)s' % user
gluon/tools.py:format='%(first_name)s %(last_name)s 
(%(id)s)'))




On Tuesday, 11 September 2012 13:14:11 UTC-5, mweissen wrote:

 I wanted to see a row of a table and I started the database administration 
 tool. I get the following snapshot.   There is a trailing %, but no s - 
 why?
 self.label '%(last_name)s %(first_name)%'
 Error snapshot [image: help]  

 type 'exceptions.KeyError'('first_name') 

 inspect attributes 
  Frames 

-  

*File D:\dropbox\InfoSMS\web2py\gluon\restricted.py in restricted at 
line 209* code arguments variables 
 -  

*File 
D:\dropbox\InfoSMS\web2py\applications\secure\controllers\appadmin.py in 
module at line 441* code arguments variables 
 -  

*File D:\dropbox\InfoSMS\web2py\gluon\globals.py in lambda at line 
185* code arguments variables 
 -  

*File 
D:\dropbox\InfoSMS\web2py\applications\secure\controllers\appadmin.py in 
update at line 283* code arguments variables 
 -  

*File D:\dropbox\InfoSMS\web2py\gluon\sqlhtml.py in __init__ at line 
1015* code arguments variables 
 -  

*File D:\dropbox\InfoSMS\web2py\gluon\sqlhtml.py in widget at line 227* 
code arguments variables 
 -  

*File D:\dropbox\InfoSMS\web2py\gluon\validators.py in _options at 
line 2480* code arguments variables 
 -  

*File D:\dropbox\InfoSMS\web2py\gluon\validators.py in options at line 
479* code arguments variables 
 -  

*File D:\dropbox\InfoSMS\web2py\gluon\validators.py in build_set at 
line 474* code arguments variables 
 Function argument list 

(self=gluon.validators.IS_IN_DB object)
 Code listing 

469.
470.
471.
472.
473.
474.

475.
476.
477.
478.

reduce(lambda a,b:a|b,(f for f in fields if not 
 f.name=='id'))


dd = dict(orderby=orderby, cache=self.cache)


records = self.dbset(table).select(table.ALL, **dd)


self.theset = [str(r[self.kfield]) for r in records]


if isinstance(self.label,str):

self.labels = [self.label % dict(r) for r in records]


else:
self.labels = [self.label(r) for r in records]


def options(self, zero=True):

  Variables  self.labels undefined  self gluon.validators.IS_IN_DB 
object  records Rows (897)  r Row {'sprechtag_wunsch': Set 
(sprechtag_wunsch... gluon.dal.RecordDeleter object at 0x09DB2350}  
self.label '%(last_name)s %(first_name)%'  builtindict type 'dict'  
 
  Context

 Regards, Martin


-- 





Re: [web2py] Re: Error in appadmin

2012-09-11 Thread Martin Weissenboeck
Sorry, my mistake!
Of course I have tried to find the wrong text in my code three times before
asking, but apperently insufficient.
Thank you for the hint with the grep coomand - it helped to find the
error.

2012/9/11 Massimo Di Pierro massimo.dipie...@gmail.com

 Not in web2py. Perhaps in the code you are running?

 $ grep '%(first_name)' gluon/*.py
 gluon/tools.py:user_identifier = '%(first_name)s'
 gluon/tools.py:return '%(first_name)s %(last_name)s' % user
 gluon/tools.py:format='%(first_name)s
 %(last_name)s (%(id)s)'))




 On Tuesday, 11 September 2012 13:14:11 UTC-5, mweissen wrote:

 I wanted to see a row of a table and I started the database
 administration tool. I get the following snapshot.   There is a trailing
 %, but no s - why?
 self.label '%(last_name)s %(first_name)%'
 Error snapshot [image: help]

 type 'exceptions.KeyError'('first_**name')

 inspect attributes
  Frames

-

*File D:\dropbox\InfoSMS\web2py\gluon\restricted.py in restricted at
line 209* code arguments variables
 -

*File 
 D:\dropbox\InfoSMS\web2py\applications\secure\controllers\appadmin.py
in module at line 441* code arguments variables
 -

*File D:\dropbox\InfoSMS\web2py\gluon\globals.py in lambda at line
185* code arguments variables
 -

*File 
 D:\dropbox\InfoSMS\web2py\applications\secure\controllers\appadmin.py
in update at line 283* code arguments variables
 -

*File D:\dropbox\InfoSMS\web2py\gluon\sqlhtml.py in __init__ at line
1015* code arguments variables
 -

*File D:\dropbox\InfoSMS\web2py\gluon\sqlhtml.py in widget at line 227
* code arguments variables
 -

*File D:\dropbox\InfoSMS\web2py\gluon\validators.py in _options at
line 2480* code arguments variables
 -

*File D:\dropbox\InfoSMS\web2py\gluon\validators.py in options at
line 479* code arguments variables
 -

*File D:\dropbox\InfoSMS\web2py\gluon\validators.py in build_set at
line 474* code arguments variables
 Function argument list

(self=gluon.validators.IS_IN_**DB object)
 Code listing


469.
470.
471.
472.
473.
474.

475.
476.
477.
478.


reduce(lambda a,b:a|b,(f for f in fields if not 
 f.name=='id'))



dd = dict(orderby=orderby, cache=self.cache)



records = self.dbset(table).select(table**.ALL, **dd)



self.theset = [str(r[self.kfield]) for r in records]



if isinstance(self.label,str):


self.labels = [self.label % dict(r) for r in records]



else:
self.labels = [self.label(r) for r in records]



def options(self, zero=True):

  Variables  self.labels undefined  self gluon.validators.IS_IN_DB
object  records Rows (897)  r Row {'sprechtag_wunsch': Set
(sprechtag_wunsch... gluon.dal.RecordDeleter object at 0x09DB2350}
self.label '%(last_name)s %(first_name)%'  builtindict type 'dict'

  Context

 Regards, Martin

  --


--