[web2py] Unable parse CSV file - 'file' object has no attribute 'readable'

2022-08-07 Thread DaneW
I want to import data from a csv file to a database table via database administration db select Import/Export in appadmin. I used to do this frequently in the past although not for a few months and it now fails with the above error message. I am using web2py version 2.22.5-stable with Python 2

[web2py] Re: Upgrading to a higher version of web2py through the admin interface

2022-01-17 Thread DaneW
I've been using Web2py on PythonAnywhere for several years and I have always upgraded via the admin interface without any problems. I'm currently on version 2.21.1. On Wednesday, 12 January 2022 at 08:30:31 UTC mostwanted wrote: > Hi guys, is it safe to upgrade my version of web2py through the

[web2py] Re: Delete sessions

2018-12-04 Thread DaneW
I use the sessions2trash.py script very successfully as an hourly task on PythonAnywhere. I copied the code from the web2py scripts folder to a scripts folder under my app as I've modified the original code slightly to print totals of trashed sessions. I use the "delete after 60 minutes" settin

[web2py] Re: SSL Error: bad handshake when use requests lib

2017-12-21 Thread DaneW
- perhaps there is someone else who uses the Facebook Graph API? On Thursday, 21 December 2017 10:11:10 UTC, killzane wrote: > > 1. unubtu terminal > OpenSSL 1.0.2g 1 Mar 2016 > > 2. python > >>> import ssl > >>> print ssl.OPENSSL_VERSION > OpenSSL 1.

[web2py] Re: SSL Error: bad handshake when use requests lib

2017-12-21 Thread DaneW
I recently have the same problem with certain websites - it seems to be an OpenSSL issue with their webserver config or their certificates. Could you tell us what version of OpenSSL is used both circumstances? terminal> openssl version and Python> print ssl.OPENSSL_VERSION On Wednesday, 20 Dec

[web2py] Re: User_agent is NoneType error

2017-11-20 Thread DaneW
Thanks. I have now upgraded to 2.16.1 but I'm afraid the problem is still there. The traceback is slightly different - File "/home/appgov/web2py/gluon/globals.py", line 340, in user_agent user_agent = user_agent_parser.detect(http_user_agent) TypeError: argument of type 'NoneType' is not iter

[web2py] Re: SQLTABLE problem with 2.15.4

2017-11-19 Thread DaneW
I have now upgraded to 2.16.1 and everything is working including COUNT which now needs to be in uppercase. Many thanks for all your work on Web2py Leonel! On Thursday, 9 November 2017 12:41:49 UTC, Leonel Câmara wrote: > > I actually think that is also a bug because it is an inconsistency. For

[web2py] User_agent is NoneType error

2017-11-17 Thread DaneW
I have recently started to get regular tickets for TypeError: argument of type 'NoneType' is not iterable on user_agent.is_mobile = 'Mobile' in http_user_agent 1. 2. 3. 4. 5. 6. 7. 8. Traceback (most recent call last): File "/home/appgov/web2py/gluon/restricted.py", line 219, in restricted

[web2py] Re: SQLTABLE problem with 2.15.4

2017-11-09 Thread DaneW
Thank you - I've now added entity_quoting=False to the right place in the db=DAL statement and magically all the SQLTABLEs are now working! There is one strange behaviour - any references to the SUM statement must have the word 'SUM' in uppercase but references to 'COUNT' must all be in lower c

[web2py] Re: SQLTABLE problem with 2.15.4

2017-11-08 Thread DaneW
peError: _select_wcols() got an unexpected keyword argument 'entity_quoting' Perhaps that was not the right place to put it. Is there any documentation about the new DAL entity quoting? It will take me a day or so to prepare the test app and database. On Wednesday, 8 November 2017 21:5

[web2py] Re: SQLTABLE problem with 2.15.4

2017-11-08 Thread DaneW
Leonel and Donatus - thank you for your responses. Yes Leonel your suggested change works! The one thing that is not working is that the headers for the Sum and Count columns display as "count('dpspend'.'amount')" and "SUM('dpspend'.'amount')" rather than the values that I specified in the hea

[web2py] SQLTABLE problem with 2.15.4

2017-11-07 Thread DaneW
I have upgraded from 2.14.6 to 2.15.4 (in PythonAnywhere using Python 2.7 and MySQL) and I now get AttributeError*: *'Expression' object has no attribute 'tablename' whenever I use COUNT or SUM in a query for SQLTABLE. It looks as though the intermediate variable names for the SUM and COUNT fie

[web2py] Re: Upgrade Web2py version button broken on PythonAnywhere admin console

2017-11-06 Thread DaneW
I'm upgrading from 2.14.6 to 2.15.4 and I had the same problem. But fortunately there seems to be a simple solution - just reload the app using the green button on the Web tab on your PythonAnywhere Dashboard. There is more on this at https://groups.google.com/forum/#!topic/web2py/4HN02rTVfyQ

[web2py] How to format a sum field with thousands separators in SQLTABLE?

2016-10-06 Thread DaneW
I have records with an amount field which is summed using Sum and Groupby and the resulting rows displayed via SQLTABLE. I want to format the summed amounts with 2 decimal places, right justified and with thousands separators. The decimal places and right justification are working fine but, des

[web2py] Re: Is there any alternative to Pythonanywhere hosting?

2015-08-16 Thread DaneW
I've been using PythonAnywhere happily for over 2 years. The database (now with over 12m records) has worked perfectly under SQLite and later MySQL - although I do get error 1226 about exceeding max_user_connections every so often. In the db.py model I have db = DAL('mysql://aaa:bbb@mysql.ser

[web2py] Re: Upgrade to 2.11.2 and Admin Interface doesn't render correctly

2015-06-21 Thread DaneW
Thank you everyone for your very helpful responses - it is working correctly again! The solution was indeed to clear the browser cache of everything in the past. Many thanks. On Wednesday, 17 June 2015 07:57:42 UTC+1, DaneW wrote: > > I've just upgraded to 2.11.2 and my application w

[web2py] Upgrade to 2.11.2 and Admin Interface doesn't render correctly

2015-06-16 Thread DaneW
I've just upgraded to 2.11.2 and my application works ok but the Admin Interface looks horrible - probably not picking up the right css etc. I tried the Upgrade button but got a DAL error message so then I downloaded the current source file, unzipped it and reinstalled my application files from