[web2py] Re: Issue with db.export_to_csv_file and Python 3.7

2019-03-04 Thread 'jim kaubisch' via web2py-users
Leonel has copied the solution over to GitHub On Saturday, March 2, 2019 at 3:22:22 AM UTC-8, Kevin Keller wrote: > > Could you make sure that your solutiona are reflected in the github > tickets for export and import problems please? > > Sure that would make it easier for Massimo to fix and

[web2py] Re: Issue with db.export_to_csv_file and Python 3.7

2019-03-02 Thread Kevin Keller
Could you make sure that your solutiona are reflected in the github tickets for export and import problems please? Sure that would make it easier for Massimo to fix and merge the fixes for 2.18.3 -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) -

[web2py] Re: Issue with db.export_to_csv_file and Python 3.7

2019-03-01 Thread Paul Ellis
I have been having a similar problem with importing from csv file and the same solution works. db.import_from_csv_file(open(path, 'r', encoding='utf-8', newline=''))Enter code here... On Saturday, 2 March 2019 00:53:29 UTC+1, jim kaubisch wrote: > > been looking around some more. turns out

[web2py] Re: Issue with db.export_to_csv_file and Python 3.7

2019-03-01 Thread 'jim kaubisch' via web2py-users
been looking around some more. turns out this is a duplicate of this open item - https://github.com/web2py/web2py/issues/2013 Have looked more closely at the 3.x docs for csv and open as well as the code for export_to_csv_file in pydal. - the csv docs say 'w' only as Leonel suggested (not

[web2py] Re: Issue with db.export_to_csv_file and Python 3.7

2019-03-01 Thread Dave S
On Friday, March 1, 2019 at 12:43:21 PM UTC-8, jim kaubisch wrote: > > Thanks, Leonel, > > In a different app (not web2py) I hit this issue pickle and the change you > suggest solved the problem > Unfortunately, in the web2py and db.export_to_csv_file context, when I > make the change you

[web2py] Re: Issue with db.export_to_csv_file and Python 3.7

2019-03-01 Thread 'jim kaubisch' via web2py-users
Thanks, Leonel, In a different app (not web2py) I hit this issue pickle and the change you suggest solved the problem Unfortunately, in the web2py and db.export_to_csv_file context, when I make the change you suggest, the error message just changes to 01/Mar/2019-12:32:27: INFO :

[web2py] Re: Issue with db.export_to_csv_file and Python 3.7

2019-03-01 Thread Leonel Câmara
You actually have to open it using only 'w' instead of 'wb' in python 3 so change it to: with open(session.db_backup_name, 'w', newline=''): See: https://docs.python.org/3/library/csv.html?highlight=csv#csv.writer -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) -