Re: [web2py] Re: How to debug appadmin CSV uploading

2020-06-13 Thread Jon Subscripted
Thanks Dave!

El El sáb, 16 may 2020 a las 23:18, Dave S  escribió:

>
>
> On Friday, May 8, 2020 at 12:41:16 PM UTC-7, Jonsubs wrote:
>>
>> Thanks!
>>
>> El El sáb, 2 may 2020 a las 3:10, Andrew Rogers 
>> escribió:
>>
>>> Can't help you Jon sorry. I tried to upload a while back but got a
>>> different issue (see
>>> https://groups.google.com/forum/#!topic/web2py/03-7xKAioD8)  So maybe
>>> that feature has fallen into disuse?
>>>
>>>
>>>
>
> For what it's worth, I have done plenty of CSV uploads from the admin
> pages (DB Mgt) but that has been mostly from 2.14.6 on my home system.
>
> On a production system, when I switched from SQLite to Postgres, the CSV
> import was hundreds of thousands of rows, and I used the psql console.
>
> /dps
>
> On Friday, 1 May 2020 16:57:38 UTC+10, Jonsubs wrote:

 Hi everyone,
 I'm trying to upload a CSV file to my MySQL database using appadmin.

 I do get a "data uploaded" flash message as if I succeeded, but data is
 not there.

 Could anyone suggest me how to debug this operation?
 Thanks, Jon.


 
  Libre
 de virus. www.avast.com
 
 <#m_-3876244012739838975_CAK8tz31GshpuRQfy8V7=4rKh7tGSE4eOqL2X9-GE+M3EkFdbCw@mail.gmail.com_m_3033399681327063300_CAK8tz31FLL14iggF+geUS_piGUFSmjKQV7ie34f=7OeQBFRh3Q@mail.gmail.com_DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>

>>> --
>>> 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.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/web2py/f7f07401-d033-4a7e-9273-79e3698050b2%40googlegroups.com
>>> 
>>> .
>>>
>> --
> 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.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/web2py/3812a283-94b3-458e-89fc-181a452d3028%40googlegroups.com
> 
> .
>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/CAK8tz33_Y%2BcrhN%3D%3DtLDsry4E3z2BSfSe_koN3pMTZFzAiSAx7Q%40mail.gmail.com.


Re: [web2py] Re: How to debug appadmin CSV uploading

2020-05-16 Thread Dave S


On Friday, May 8, 2020 at 12:41:16 PM UTC-7, Jonsubs wrote:
>
> Thanks!
>
> El El sáb, 2 may 2020 a las 3:10, Andrew Rogers  > escribió:
>
>> Can't help you Jon sorry. I tried to upload a while back but got a 
>> different issue (see 
>> https://groups.google.com/forum/#!topic/web2py/03-7xKAioD8)  So maybe 
>> that feature has fallen into disuse?
>>
>>
>>

For what it's worth, I have done plenty of CSV uploads from the admin pages 
(DB Mgt) but that has been mostly from 2.14.6 on my home system.
 
On a production system, when I switched from SQLite to Postgres, the CSV 
import was hundreds of thousands of rows, and I used the psql console.

/dps

On Friday, 1 May 2020 16:57:38 UTC+10, Jonsubs wrote:
>>>
>>> Hi everyone,
>>> I'm trying to upload a CSV file to my MySQL database using appadmin.
>>>
>>> I do get a "data uploaded" flash message as if I succeeded, but data is 
>>> not there.
>>>
>>> Could anyone suggest me how to debug this operation?
>>> Thanks, Jon.
>>>
>>>
>>> 
>>>  Libre 
>>> de virus. www.avast.com 
>>> 
>>>  
>>> <#CAK8tz31GshpuRQfy8V7=4rKh7tGSE4eOqL2X9-GE+M3EkFdbCw@mail.gmail.com_m_3033399681327063300_CAK8tz31FLL14iggF+geUS_piGUFSmjKQV7ie34f=7OeQBFRh3Q@mail.gmail.com_DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
>>>
>> -- 
>> 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 .
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/web2py/f7f07401-d033-4a7e-9273-79e3698050b2%40googlegroups.com
>>  
>> 
>> .
>>
>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/3812a283-94b3-458e-89fc-181a452d3028%40googlegroups.com.


Re: [web2py] Re: How to debug appadmin CSV uploading

2020-05-08 Thread Jon Subscripted
Thanks!

El El sáb, 2 may 2020 a las 3:10, Andrew Rogers 
escribió:

> Can't help you Jon sorry. I tried to upload a while back but got a
> different issue (see
> https://groups.google.com/forum/#!topic/web2py/03-7xKAioD8)  So maybe
> that feature has fallen into disuse?
>
>
> On Friday, 1 May 2020 16:57:38 UTC+10, Jonsubs wrote:
>>
>> Hi everyone,
>> I'm trying to upload a CSV file to my MySQL database using appadmin.
>>
>> I do get a "data uploaded" flash message as if I succeeded, but data is
>> not there.
>>
>> Could anyone suggest me how to debug this operation?
>> Thanks, Jon.
>>
>>
>> 
>>  Libre
>> de virus. www.avast.com
>> 
>> <#m_3033399681327063300_CAK8tz31FLL14iggF+geUS_piGUFSmjKQV7ie34f=7OeQBFRh3Q@mail.gmail.com_DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
>>
> --
> 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.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/web2py/f7f07401-d033-4a7e-9273-79e3698050b2%40googlegroups.com
> 
> .
>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/CAK8tz31GshpuRQfy8V7%3D4rKh7tGSE4eOqL2X9-GE%2BM3EkFdbCw%40mail.gmail.com.


[web2py] Re: How to debug appadmin CSV uploading

2020-05-01 Thread Andrew Rogers
Can't help you Jon sorry. I tried to upload a while back but got a 
different issue (see 
https://groups.google.com/forum/#!topic/web2py/03-7xKAioD8)  So maybe that 
feature has fallen into disuse?


On Friday, 1 May 2020 16:57:38 UTC+10, Jonsubs wrote:
>
> Hi everyone,
> I'm trying to upload a CSV file to my MySQL database using appadmin.
>
> I do get a "data uploaded" flash message as if I succeeded, but data is 
> not there.
>
> Could anyone suggest me how to debug this operation?
> Thanks, Jon.
>
>
> 
>  Libre 
> de virus. www.avast.com 
> 
>  
> <#CAK8tz31FLL14iggF+geUS_piGUFSmjKQV7ie34f=7OeQBFRh3Q@mail.gmail.com_DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/f7f07401-d033-4a7e-9273-79e3698050b2%40googlegroups.com.


[web2py] Re: How to debug appadmin CSV uploading

2020-05-01 Thread Clemens
Hi Jon,

I prefer to upload csv files to the database via the python console, 
starting it as follows:
python **/web2py.py -S ** 
-M -P

There you can import the csv as follows (assuming your database is 
reference by db, i.e. db = DAL(...)):
filename = **/**.csv'; print(filename)

*python2:*
db.import_from_csv_file(open(filename, 'rb')); db.commit()

*python3:*
db.import_from_csv_file(open(str(filename), 'r', encoding='utf-8')); 
db.commit()

To empty an existing database I do it the same way as follows:
for table_name in db.tables():
>>> db[table_name].drop()

db.commit()

Hope it helps!

Regards
Clemens


On Friday, May 1, 2020 at 8:57:38 AM UTC+2, Jonsubs wrote:
>
> Hi everyone,
> I'm trying to upload a CSV file to my MySQL database using appadmin.
>
> I do get a "data uploaded" flash message as if I succeeded, but data is 
> not there.
>
> Could anyone suggest me how to debug this operation?
> Thanks, Jon.
>
>
> 
>  Libre 
> de virus. www.avast.com 
> 
>  
> <#CAK8tz31FLL14iggF+geUS_piGUFSmjKQV7ie34f=7OeQBFRh3Q@mail.gmail.com_DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/2f6897b9-51fc-4765-8893-30a736e6ba51%40googlegroups.com.