[web2py] Re: please help us test trunk web2py

2018-03-11 Thread Paolo
@nbush, could you post a code snippet to reproduce the error? Which web2py 
version have you tested?

On Wednesday, March 7, 2018 at 11:31:14 PM UTC+1, Nbush wrote:
>
> Pluralizaiton error. (test on python 2.7.13)
>
>  'ascii' codec can't decode byte 
> 0xd0 in position 0: ordinal not in range(128)
> Function argument list
>
> (self=, 
> message='%{!\xd0\xb2\xd1\x8b\xd0\xb1\xd1\x80\xd0\xb0\xd0\xbd\xd0\xb0[0]} 1 
> %{\xd0\xb7\xd0\xb0\xd0\xbf\xd0\xb8\xd1\x81\xd1\x8c[0]}', symbols=(1,))
> Code listing
>
> 929.
> 930.
> 931.
> 932.
> 933.
> 934.
>
> 935.
> 936.
> 937.
> 938.
>
> part = regex_plural_dict.sub(sub_dict, s)
> if part == s:
> return m.group(0)
> return part
> message = message % symbols
> message = regex_plural.sub(sub_plural, message)
>
> return message
>
> def translate(self, message, symbols):
> """
>
> Variables
> message '%{!\xd0\xb2\xd1\x8b\xd0\xb1\xd1\x80\xd0\xb0\xd0\xbd\xd0\xb0[0]} 
> 1 %{\xd0\xb7\xd0\xb0\xd0\xbf\xd0\xb8\xd1\x81\xd1\x8c[0]}'
> global regex_plural <_sre.SRE_Pattern object>
> regex_plural.sub 
> sub_plural 
>

-- 
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] Python 3

2018-03-11 Thread Andrea Fae'
Can I really use web2py with Python 3? I fell they are a lot of bugs...Is 
it better to stay in the version 2?
thank you

-- 
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: Python 3

2018-03-11 Thread Anthony
Python 2 might be a little more stable for now until Python 3 gets more 
usage and the remaining bugs are identified and fixed.

On Sunday, March 11, 2018 at 11:21:19 AM UTC-4, Andrea Fae' wrote:
>
> Can I really use web2py with Python 3? I fell they are a lot of bugs...Is 
> it better to stay in the version 2?
> thank you
>

-- 
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: please help us test trunk web2py

2018-03-11 Thread Nbush
@Paolo
in apps welcome
in models/db.py add

T.force('ru')

go admin db

../welcome/appadmin/select/db?query=db.auth_user.id>0

oops
Internal errorTicket issued: 
welcome/178.176.112.38.2018-03-11.19-36-21.63a51c38-0dec-4c13-aa02-3bf882b632e5 


If the browser language is English, everything works fine


воскресенье, 11 марта 2018 г., 13:47:04 UTC+3 пользователь Paolo написал:
>
> @nbush, could you post a code snippet to reproduce the error? Which web2py 
> version have you tested?
>
> On Wednesday, March 7, 2018 at 11:31:14 PM UTC+1, Nbush wrote:
>>
>> Pluralizaiton error. (test on python 2.7.13)
>>
>>  'ascii' codec can't decode byte 
>> 0xd0 in position 0: ordinal not in range(128)
>> Function argument list
>>
>> (self=, 
>> message='%{!\xd0\xb2\xd1\x8b\xd0\xb1\xd1\x80\xd0\xb0\xd0\xbd\xd0\xb0[0]} 1 
>> %{\xd0\xb7\xd0\xb0\xd0\xbf\xd0\xb8\xd1\x81\xd1\x8c[0]}', symbols=(1,))
>> Code listing
>>
>> 929.
>> 930.
>> 931.
>> 932.
>> 933.
>> 934.
>>
>> 935.
>> 936.
>> 937.
>> 938.
>>
>> part = regex_plural_dict.sub(sub_dict, s)
>> if part == s:
>> return m.group(0)
>> return part
>> message = message % symbols
>> message = regex_plural.sub(sub_plural, message)
>>
>> return message
>>
>> def translate(self, message, symbols):
>> """
>>
>> Variables
>> message '%{!\xd0\xb2\xd1\x8b\xd0\xb1\xd1\x80\xd0\xb0\xd0\xbd\xd0\xb0[0]} 
>> 1 %{\xd0\xb7\xd0\xb0\xd0\xbf\xd0\xb8\xd1\x81\xd1\x8c[0]}'
>> global regex_plural <_sre.SRE_Pattern object>
>> regex_plural.sub 
>> sub_plural 
>>
>

-- 
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] Issue with defaultdict(list)

2018-03-11 Thread Drew Howell
I seem to be having issues getting defaultdict to work within Web2Py. I am 
using Web2Py version 2.16.1 (Python 2.7.11).

Here is the code in my controller:
from collections import defaultdict
g = defaultdict(list)
g['someKey'].append('someValue')

Here is the error I'm getting:

File "D:/web2py/applications/fpr/controllers/students.py" 
, line 
14, in view
 g['someKey'].append('someValue')
AttributeError: 'dict' object has no attribute 'append'

If I do the same thing in the Python Interpreter, I don't seem to get the issue.

>>> from collections import defaultdict
>>> g = defaultdict(list)
>>> g['k'].append('v')
>>> print g['k']
['v']

Am I implementing this wrong or is there some sort of issue with using 
defaultdict(list) in Web2Py?

-- 
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] Issue with defaultdict(list)

2018-03-11 Thread Val K
Hi! 
If you're Windows user  it's requires to run web2py from source (not 
web2py.exe) to get modules that are installed on your machine

-- 
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.