[web2py] Is it possible to show the results from a SELECT (made with SQLite using db.executesql) in a grid?

2019-04-01 Thread Val K
Create view in sqlite "CREATE VIEW your_tbl_name AS SELECT ..." using 
executesql and define corresponding  web2py table with migrate=False, 
fake_migrate=True

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


Re: [web2py] Re: Click the update web2py button in Python Anywhere (PA) leads to crash.

2019-04-01 Thread Ron Chatterjee
This is a bigger problem than space X

On Monday, April 1, 2019 at 8:45:56 AM UTC-4, Nico Zanferrari wrote:
>
> Hi Ron, 
>
> so there should be other problems... Take a look here 
> https://www.pythonanywhere.com/forums/topic/7669/  , it shows you how to 
> change the password, reload web2py from scratch with git and even change 
> the python version used.
>
> Nico
>
> Il giorno lun 1 apr 2019 alle ore 14:14 Ron Chatterjee <
> achatte...@gmail.com > ha scritto:
>
>> Nico,
>>
>> I have done the reload. Didn't work. What I have done is opened a new 
>> app. Unfortunately, if I create a app through PA it still load an old 
>> version of web2py (2.14). So, I needed to delete that and download a new 
>> source file. I did the reload. But when I tried to access the site I get an 
>> error:
>>
>> admin disabled because unable to access password file
>>
>> -Ron
>>
>>
>>
>>
>>
>> On Sunday, March 31, 2019 at 4:37:58 PM UTC-4, Nico Zanferrari wrote:
>>>
>>> Hi Ron,
>>>
>>> the integrated upgrade button works fine on PA. But after obtaining the 
>>> ticket error on the web2py page you have to go to the PA admin page, under 
>>> the WEB tab, and press the green RELOAD button. The page is something like "
>>> https://www.pythonanywhere.com/user/yourname/webapps/#tab_id_yourname_pythonanywhere_com
>>>  
>>> 
>>> "  
>>>
>>> Cheers,
>>> Nico
>>>
>>> Il giorno dom 31 mar 2019 alle ore 16:20 Ron Chatterjee <
>>> achatte...@gmail.com> ha scritto:
>>>

 That's the button in PA lead to crash. Usually in my local computer I 
 will just delete the old web2py and install a refresh. I don't know how to 
 do this using bash while keeping my old application folder. Any help on 
 this will be appreciated. 




 On Sunday, March 31, 2019 at 9:18:32 AM UTC-4, Ron Chatterjee wrote:
>
> Hello, Clicked on the update button on python anywhere and web2py 
> didn't update. Python Anywhere send me a link to help the issue which 
> doesn't help the issue. May be they don't have a clue. Have anywhere 
> created a python anywhere site where they "update" the web2py using the 
> PA 
> button and it crashed?
>
> Looking for some support as there are lack of support on this from PA. 
>
> One way I can think of is go to the file area and upload a fresh copy 
> of web2py but its been a while I used unix. Not sure how it can be done 
> from the bash. 
>
 -- 
 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 web...@googlegroups.com.
 For more options, visit https://groups.google.com/d/optout.

>>> -- 
>> 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 web...@googlegroups.com .
>> For more options, visit https://groups.google.com/d/optout.
>>
>

-- 
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: Why python anywhere stuck with web2py 2.15 version

2019-04-01 Thread Ron Chatterjee
I did. They said its lot of work to change from 2.14 to any newer version 
and they don't have time.



On Monday, April 1, 2019 at 7:27:23 PM UTC-4, Scott Hunter wrote:
>
> Shouldn't you ask them?
>
> On Monday, April 1, 2019 at 8:57:21 AM UTC-4, Ron Chatterjee wrote:
>>
>> Does anyone know why python anywhere only give option for 2.15 edition of 
>> web2py? If I have to guess that's few years old. I asked the question 
>> because I am not sure if they believe 2.15 is more stable for 2.18. Is any 
>> reason they use an older version of 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] Re: Why python anywhere stuck with web2py 2.15 version

2019-04-01 Thread Scott Hunter
Shouldn't you ask them?

On Monday, April 1, 2019 at 8:57:21 AM UTC-4, Ron Chatterjee wrote:
>
> Does anyone know why python anywhere only give option for 2.15 edition of 
> web2py? If I have to guess that's few years old. I asked the question 
> because I am not sure if they believe 2.15 is more stable for 2.18. Is any 
> reason they use an older version of 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] Re: How can I convert a SUM from a SQLite SELECT statement to web2py's DAL?

2019-04-01 Thread Scott Hunter
This part of the web2py book might 
help: http://www.web2py.com/book/default/chapter/06#sum-avg-min-max-and-len

On Monday, April 1, 2019 at 6:41:51 PM UTC-4, João Matos wrote:
>
> Hello,
>
> I have this SELECT in SQLite
>
> result = db.executesql(
> "SELECT auth_user.id, auth_user.username, "
> "auth_user.canceled_on, "
> "auth_user.canceled_by, "
> "SUM(auth_group.role = 'Operador') operador, "
> "SUM(auth_group.role = 'Verificador') verificador, "
> "SUM(auth_group.role = 'Supervisor') supervisor "
> "FROM auth_user "
> "LEFT JOIN auth_membership ON auth_user.id = 
> auth_membership.user_id "
> "LEFT JOIN auth_group ON auth_group.id = 
> auth_membership.group_id "
> "GROUP BY username ORDER BY username"
> )
>
> and would like to convert it to web2py's DAL.
> I made this
>
> query = db().select(
> db.auth_user.id,
> db.auth_user.username,
> db.auth_user.canceled_on,
> db.auth_user.canceled_by,
> left=(
> db.auth_membership.on(db.auth_user.id == db.auth_membership.
> user_id),
> db.auth_group.on(db.auth_group.id == db.auth_membership.group_id),
> ),
> groupby=db.auth_user.username,
> orderby=db.auth_user.username,
> )
>
> but I can't find any way to integrate the sums.
>
> Does anyone know how to do it?
>
> Thanks,
>
> JM
>

-- 
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] How can I convert a SUM from a SQLite SELECT statement to web2py's DAL?

2019-04-01 Thread João Matos
Hello,

I have this SELECT in SQLite

result = db.executesql(
"SELECT auth_user.id, auth_user.username, "
"auth_user.canceled_on, "
"auth_user.canceled_by, "
"SUM(auth_group.role = 'Operador') operador, "
"SUM(auth_group.role = 'Verificador') verificador, "
"SUM(auth_group.role = 'Supervisor') supervisor "
"FROM auth_user "
"LEFT JOIN auth_membership ON auth_user.id = 
auth_membership.user_id "
"LEFT JOIN auth_group ON auth_group.id = 
auth_membership.group_id "
"GROUP BY username ORDER BY username"
)

and would like to convert it to web2py's DAL.
I made this

query = db().select(
db.auth_user.id,
db.auth_user.username,
db.auth_user.canceled_on,
db.auth_user.canceled_by,
left=(
db.auth_membership.on(db.auth_user.id == db.auth_membership.user_id
),
db.auth_group.on(db.auth_group.id == db.auth_membership.group_id),
),
groupby=db.auth_user.username,
orderby=db.auth_user.username,
)

but I can't find any way to integrate the sums.

Does anyone know how to do it?

Thanks,

JM

-- 
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] Is it possible to show the results from a SELECT (made with SQLite using db.executesql) in a grid?

2019-04-01 Thread João Matos
Hello,

Is it possible to show the results from a SELECT (made with SQLite using 
db.executesql) in a grid?
I have this 

result = db.executesql(
"SELECT auth_user.id, auth_user.username, "
"auth_user.canceled_on, "
"auth_user.canceled_by, "
"SUM(auth_group.role = 'Operador') operador, "
"SUM(auth_group.role = 'Verificador') verificador, "
"SUM(auth_group.role = 'Supervisor') supervisor "
"FROM auth_user "
"LEFT JOIN auth_membership ON auth_user.id = 
auth_membership.user_id "
"LEFT JOIN auth_group ON auth_group.id = 
auth_membership.group_id "
"GROUP BY username ORDER BY username"
)

that returns a list of tuples, and would like to show it using the grid.

Is it possible?

Thanks,

JM

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


Re: [web2py] Re: Not my type

2019-04-01 Thread Al Hart
Hi Joe (sorry for delay, I took the weekend off. BTW, on a totally 
different note, why is the date showing March 29 on last reply??),

Yes, you're absolutely right, it's a Python version thing. I started my 
session in Python 3.x and so the examples in the web2py book weren't 
working as it seems they're based off Python 2.x 
(I was getting: 

> SyntaxError: invalid syntax. 


My question is how to update the book so that super noobs like me won't 
trip over the same thing. It would just need a line mentioning that in 
Python 3, you'd have to do it 'X' way (and how to check which version 
you're using). Or something like that. Would we try a pull request to try 
an update or just mention in this space and someone will attend to it?

 

On Friday, March 29, 2019 at 8:39:02 PM UTC-4, Joe Barnhart wrote:
>
> I suspect you were actually running Python 3.x in which case "print xxx" 
> doesn't work because print has been mad into a function (requiring 
> parentheses).  When I start each on my Mac, this is the display I get:
>
> Python 2.7:
>
> ssmain:~ jbarnhart$ python
>
> Python 2.7.10 (default, Feb 22 2019, 21:17:52)
>
> [GCC 4.2.1 Compatible Apple LLVM 10.0.1 (clang-1001.0.37.14)] on darwin
>
> Type "help", "copyright", "credits" or "license" for more information.
>
> >>> 
>
>
> Python 3.7:
>
> ssmain:~ jbarnhart$ 
>
> ssmain:~ jbarnhart$ python3
>
> Python 3.7.2 (default, Feb 12 2019, 08:15:36) 
>
> [Clang 10.0.0 (clang-1000.11.45.5)] on darwin
>
> Type "help", "copyright", "credits" or "license" for more information.
>
> >>> 
>
> You should be able to tell the version by the startup message.  If you are 
> actually running Python 2 and the code fails, copy and paste the actual 
> error message you get and we'll puzzle it out.
>
> Warm regards,
> Joe
>
>
>
>
> On Friday, March 29, 2019 at 7:32:52 AM UTC-7, Al Hart wrote:
>>
>> Hi Joe,
>>
>> Thanks so much for responding. Let me be more specific. I was referring 
>> to a section in the book, chapter two, on types 
>> 
>> .
>> In there it suggests
>>
>> >>> a = 3>>> print type(a)
>>>
>>> But that didn't work for me, I got error messages (don't recall what 
>> they were at this moment).
>> However, when I tried it using two other methods...
>> 1.
>>
>>> >>> a = 3 
>>
>> >>> type(a)
>>
>> or
>> 2.
>>
>>> >>> a = 3 
>>
>> >>> print(type(a))
>>
>>
>> Both of those worked for me. Kind of weird because when I checked which 
>> version of python I had running  it said 2.7 but perhaps I installed w2p 
>> with python3.
>>
>> Anyway, at the end I was suggesting that maybe we could update the book 
>> some making reference to how things might look with python3. I wasn't sure 
>> if that sort of thing is just done here, by mentioning it in the forum and 
>> someone will get to it, or if it might be done by pull request.
>>
>> Best,
>>
>> Al
>>
>> On Thu, Mar 28, 2019 at 9:30 PM Joe Barnhart  wrote:
>>
>>> Hi Al --
>>>
>>> First off, welcome to the web2py group.  Next, it's not clear from your 
>>> message just what the question is.  If you can elaborate on (a) what you 
>>> did, (b) what you expected, and (c) what you got, I'm sure someone here can 
>>> help
>>>
>>> Warm regards,
>>>
>>> Joe B.
>>>
>>> On Thursday, March 28, 2019 at 2:10:50 AM UTC-7, Al Hart wrote:

 Hi folks, if you'll pardon the corny title, I am brand new to web2py 
 (so excited to discover it) and I'm just working may way through the book. 
 In Chapter two, the section on types, I tried to run the examples, but I 
 got error messages. Googling around it seemed to work better if I went one 
 of two ways:


1. a = 3
type(a)
2. a = 4 
print(type(a))


 I'm on Ubuntu 18.04. Not sure if the example is based on python 3? If 
 not, is this the best way to suggest updates to the book or should we just 
 try a pull request? 

>>> -- 
>>> 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 a topic in the 
>>> Google Groups "web2py-users" group.
>>> To unsubscribe from this topic, visit 
>>> https://groups.google.com/d/topic/web2py/VityJ20AV2M/unsubscribe.
>>> To unsubscribe from this group and all its topics, send an email to 
>>> web...@googlegroups.com.
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>

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

Re: [web2py] UnicodeDecodeError('utf-8' codec can't decode byte 0xf8 in position 4: invalid start byte)

2019-04-01 Thread Maurice Waka
Just noted that one of my files was corrupted.
Problem solved
Regards

On Mon, 1 Apr 2019, 14:50 Maurice Waka  wrote:

> I have started getting this error when opening a page:
>
> Traceback
>
> 1.
> 2.
> 3.
> 4.
> 5.
> 6.
> 7.
> 8.
> 9.
> 10.
> 11.
> 12.
> 13.
>  Traceback (most recent call last):
>  File "/home/mauricewaka/web2py/gluon/main.py", line 444, in wsgibase
>  serve_controller(request, response, session)
>  File "/home/mauricewaka/web2py/gluon/main.py", line 183, in
> serve_controller
>  page = run_view_in(response._view_environment)
>  File "/home/mauricewaka/web2py/gluon/compileapp.py", line 731, in
> run_view_in
>  context=environment)
>  File "/home/mauricewaka/web2py/gluon/packages/yatl/yatl/template.py",
> line 809, in parse_template
>  text = to_native(text)
>  File "/home/mauricewaka/web2py/gluon/packages/yatl/yatl/template.py",
> line 38, in to_native
>  return obj if isinstance(obj, str) else obj.decode(charset, errors)
> UnicodeDecodeError: 'utf-8' codec can't decode byte 0xf8 in position 4:
> invalid start byte
>
>
> --
> 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 a topic in the
> Google Groups "web2py-users" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/web2py/rEa2xjIkCE8/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> web2py+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

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


Re: [web2py] Re: Redis and Python3?

2019-04-01 Thread Jim S
Ok, how about this for a fix:

I inserted the following at lines 147 and 225 in 
gluon/contrib/redis_session.py.


kwargs['locked'] = str(kwargs['locked'])
kwargs['modified_datetime'] = str(kwargs['modified_datetime'])


Any redis_session experts out there that can help with this?

My understanding is that when the python redis client went from v2 to v3 it 
now defaults to a StrictRedis client instead of a Redis client.  Details 
can be found here:  https://pypi.org/project/redis/

Any help would really be appreciated.

-Jim



On Sunday, March 31, 2019 at 11:10:37 PM UTC-5, Jim S wrote:
>
> Thanks Joe
>
> Not what I wanted to hear, but the right answer. I'm just going to have to 
> keep redis back leveled for now.
>
> Jim
>
>
> On Sun, Mar 31, 2019, 10:40 PM Joe Barnhart  
> wrote:
>
>> Looking at the rest of globals.py I don't think this approach will work.  
>> For one, it affects storing sessions in any database, not just redis.  
>> Since the table is declared with a "boolean" field I don't think its gonna 
>> like the string version of "False".
>>
>> I wonder why we don't have a simple minded dialect in DAL for redis.  
>> Admittedly, it's not a RDBMS so a lot of DAL just won't ever work on 
>> redis.  But it would have provided a clean place to map "booleans" to 
>> strings instead of bools in this case, making it easy to special-case redis.
>>
>> But maybe that would encourage people to complain that the implementation 
>> of the redis DAL dialect is too deficient.  Putting it in DAL would raise 
>> people's expectations of what it can handle.
>>
>> -- Joe
>>
>>
>> On Sunday, March 31, 2019 at 10:19:20 AM UTC-7, Jim S wrote:
>>>
>>> I changed the following in gluon/globals.py and mine is working now.  
>>> But, I'm unclear on how to test to see if it is handling the locking 
>>> properly:
>>>
>>> dd = dict(locked=False,
>>>   client_ip=response.session_client,
>>>   modified_datetime=request.now,
>>>   session_data=session_pickled,
>>>   unique_key=unique_key)
>>>
>>> to 
>>>
>>> dd = dict(locked='False',
>>>   client_ip=response.session_client,
>>>   modified_datetime=str(request.now),
>>>   session_data=session_pickled,
>>>   unique_key=unique_key)
>>>
>>> This makes all my stuff work (I'm still on Python 2.7 but I think the 
>>> problem has to do with the python redis client moving to version 3).
>>>
>>> Leonel - I think this relates back to an issue you commented on late 
>>> last year.   
>>> https://groups.google.com/forum/?pli=1#!searchin/web2py/redis%7Csort:date/web2py/PdquGF_9a2E/6VJpLqsnBgAJ
>>>
>>> At that time I just continued using python redis 2.10.6.  But, can't do 
>>> that forever.  Anyone able to test or improve upon the change I made 
>>> above?  Like I said, it works for me, but I don't know how to see if I'm 
>>> causing any other unforeseen damage.
>>>
>>> -Jim
>>>
>>> On Friday, March 29, 2019 at 7:49:03 PM UTC-5, Joe Barnhart wrote:

 Hi Leonel --

 My brain refuses to put together the words "session locked field".  I 
 understand the part of pickle smashing the values and encoding them as one 
 string.  The bool has something to do with session locking?  

 I've only looked at the web2py redis code in the most scant way as I 
 wasn't planning to become a redis expert.  Sessions in redis could be 
 important to me, tho, so I may need to set aside some time to dig into it. 
  (Storing sessions in cookies has been problematic due to the limited 
 space 
 for cookies in browsers.)

 -- Joe


 On Wednesday, March 27, 2019 at 4:49:25 PM UTC-7, Leonel Câmara wrote:
>
> It's not your values Joe, pickle serializes them as a string so they 
> would be fine. It's web2py session locked field which is True or False. 
> It's probably easy to fix this in redis_session.py
>
 -- 
>> 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 a topic in the 
>> Google Groups "web2py-users" group.
>> To unsubscribe from this topic, visit 
>> https://groups.google.com/d/topic/web2py/0iU2wqSik0k/unsubscribe.
>> To unsubscribe from this group and all its topics, send an email to 
>> web2py+unsubscr...@googlegroups.com.
>> For more options, visit https://groups.google.com/d/optout.
>>
>

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

[web2py] Why python anywhere stuck with web2py 2.15 version

2019-04-01 Thread Ron Chatterjee
Does anyone know why python anywhere only give option for 2.15 edition of 
web2py? If I have to guess that's few years old. I asked the question 
because I am not sure if they believe 2.15 is more stable for 2.18. Is any 
reason they use an older version of 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.


Re: [web2py] Re: Click the update web2py button in Python Anywhere (PA) leads to crash.

2019-04-01 Thread Nico Zanferrari
Hi Ron,

so there should be other problems... Take a look here
https://www.pythonanywhere.com/forums/topic/7669/  , it shows you how to
change the password, reload web2py from scratch with git and even change
the python version used.

Nico

Il giorno lun 1 apr 2019 alle ore 14:14 Ron Chatterjee <
achatterjee...@gmail.com> ha scritto:

> Nico,
>
> I have done the reload. Didn't work. What I have done is opened a new app.
> Unfortunately, if I create a app through PA it still load an old version of
> web2py (2.14). So, I needed to delete that and download a new source file.
> I did the reload. But when I tried to access the site I get an error:
>
> admin disabled because unable to access password file
>
> -Ron
>
>
>
>
>
> On Sunday, March 31, 2019 at 4:37:58 PM UTC-4, Nico Zanferrari wrote:
>>
>> Hi Ron,
>>
>> the integrated upgrade button works fine on PA. But after obtaining the
>> ticket error on the web2py page you have to go to the PA admin page, under
>> the WEB tab, and press the green RELOAD button. The page is something like "
>> https://www.pythonanywhere.com/user/yourname/webapps/#tab_id_yourname_pythonanywhere_com
>> 
>> "
>>
>> Cheers,
>> Nico
>>
>> Il giorno dom 31 mar 2019 alle ore 16:20 Ron Chatterjee <
>> achatte...@gmail.com> ha scritto:
>>
>>>
>>> That's the button in PA lead to crash. Usually in my local computer I
>>> will just delete the old web2py and install a refresh. I don't know how to
>>> do this using bash while keeping my old application folder. Any help on
>>> this will be appreciated.
>>>
>>>
>>>
>>>
>>> On Sunday, March 31, 2019 at 9:18:32 AM UTC-4, Ron Chatterjee wrote:

 Hello, Clicked on the update button on python anywhere and web2py
 didn't update. Python Anywhere send me a link to help the issue which
 doesn't help the issue. May be they don't have a clue. Have anywhere
 created a python anywhere site where they "update" the web2py using the PA
 button and it crashed?

 Looking for some support as there are lack of support on this from PA.

 One way I can think of is go to the file area and upload a fresh copy
 of web2py but its been a while I used unix. Not sure how it can be done
 from the bash.

>>> --
>>> 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 web...@googlegroups.com.
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>> --
> 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.
>

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


Re: [web2py] Re: Click the update web2py button in Python Anywhere (PA) leads to crash.

2019-04-01 Thread Ron Chatterjee
Nico,

I have done the reload. Didn't work. What I have done is opened a new app. 
Unfortunately, if I create a app through PA it still load an old version of 
web2py (2.14). So, I needed to delete that and download a new source file. 
I did the reload. But when I tried to access the site I get an error:

admin disabled because unable to access password file

-Ron





On Sunday, March 31, 2019 at 4:37:58 PM UTC-4, Nico Zanferrari wrote:
>
> Hi Ron,
>
> the integrated upgrade button works fine on PA. But after obtaining the 
> ticket error on the web2py page you have to go to the PA admin page, under 
> the WEB tab, and press the green RELOAD button. The page is something like "
> https://www.pythonanywhere.com/user/yourname/webapps/#tab_id_yourname_pythonanywhere_com
>  
> 
> "  
>
> Cheers,
> Nico
>
> Il giorno dom 31 mar 2019 alle ore 16:20 Ron Chatterjee <
> achatte...@gmail.com > ha scritto:
>
>>
>> That's the button in PA lead to crash. Usually in my local computer I 
>> will just delete the old web2py and install a refresh. I don't know how to 
>> do this using bash while keeping my old application folder. Any help on 
>> this will be appreciated. 
>>
>>
>>
>>
>> On Sunday, March 31, 2019 at 9:18:32 AM UTC-4, Ron Chatterjee wrote:
>>>
>>> Hello, Clicked on the update button on python anywhere and web2py didn't 
>>> update. Python Anywhere send me a link to help the issue which doesn't help 
>>> the issue. May be they don't have a clue. Have anywhere created a python 
>>> anywhere site where they "update" the web2py using the PA button and it 
>>> crashed?
>>>
>>> Looking for some support as there are lack of support on this from PA. 
>>>
>>> One way I can think of is go to the file area and upload a fresh copy of 
>>> web2py but its been a while I used unix. Not sure how it can be done from 
>>> the bash. 
>>>
>> -- 
>> 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 web...@googlegroups.com .
>> For more options, visit https://groups.google.com/d/optout.
>>
>

-- 
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] UnicodeDecodeError('utf-8' codec can't decode byte 0xf8 in position 4: invalid start byte)

2019-04-01 Thread Maurice Waka
I have started getting this error when opening a page:

Traceback

1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
 Traceback (most recent call last):
 File "/home/mauricewaka/web2py/gluon/main.py", line 444, in wsgibase
 serve_controller(request, response, session)
 File "/home/mauricewaka/web2py/gluon/main.py", line 183, in 
serve_controller
 page = run_view_in(response._view_environment)
 File "/home/mauricewaka/web2py/gluon/compileapp.py", line 731, in 
run_view_in
 context=environment)
 File "/home/mauricewaka/web2py/gluon/packages/yatl/yatl/template.py", line 
809, in parse_template
 text = to_native(text)
 File "/home/mauricewaka/web2py/gluon/packages/yatl/yatl/template.py", line 
38, in to_native
 return obj if isinstance(obj, str) else obj.decode(charset, errors)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xf8 in position 4: 
invalid start byte


-- 
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] Testing testing...

2019-04-01 Thread António Ramos
Hello all
what is the best way to test modules?
also why nobody talks about tests in web2py when in every other framework
they do it from the beggining. For starters its less noisy but when app
grows we eventually need testing skills or we are doomed...

PS i saw pytest with web2py and it seems the best option but all examples
are 3 years old ...


Regards
António

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