No, I don't think there are two columns labelled 'title'.
I attach the csv...
Thanks for your interest

El miércoles, 19 de junio de 2013 17:55:27 UTC+2, Christian Foster Howes 
escribió:
>
> check your CSV file - that error looks to me like there are 2 columns 
> with the name "title" and therefore the DB does not know what data to 
> store where. 
>
> On 6/19/13 8:38 , peibol wrote: 
> > Here is what I get: 
> > 
> > 
> > Error ticket for "myeducenter"Ticket ID 
> > 
> > 127.0.0.1.2013-06-19.17-34-43.e551a8f8-a45b-4b22-9e22-e76381dc5977 
> > <class 'sqlite3.IntegrityError'> column title is not 
> uniqueVersi�nweb2py�Version 
> > 2.5.1-stable+timestamp.2013.06.11.08.00.05PythonPython 2.7.5: 
> > c:\Python27\python.exe (prefix: c:\Python27)Traceback 
> > 
> > 1. 
> > 2. 
> > 3. 
> > 4. 
> > 5. 
> > 6. 
> > 7. 
> > 8. 
> > 9. 
> > 10. 
> > 11. 
> > 12. 
> > 13. 
> > 14. 
> > 15. 
> > 16. 
> > 17. 
> > 18. 
> > 
> > Traceback (most recent call last): 
> >    File "E:\My Dropbox\myWebs\MyApps\myeduapps\gluon\restricted.py", 
> line 212, in restricted 
> >      exec ccode in environment 
> >    File "E:/My 
> Dropbox/myWebs/MyApps/myeduapps/applications/myeducenter/controllers/default.py"
>  
> <
> http://127.0.0.1:8083/admin/default/edit/myeducenter/controllers/default.py>, 
> line 116, in <module> 
> >    File "E:\My Dropbox\myWebs\MyApps\myeduapps\gluon\globals.py", line 
> 194, in <lambda> 
> >      self._caller = lambda f: f() 
> >    File "E:/My 
> Dropbox/myWebs/MyApps/myeduapps/applications/myeducenter/controllers/default.py"
>  
> <
> http://127.0.0.1:8083/admin/default/edit/myeducenter/controllers/default.py>, 
> line 97, in import_and_sync 
> >      db.import_from_csv_file(form.vars.data.file,unique=False) 
> >    File "E:\My Dropbox\myWebs\MyApps\myeduapps\gluon\dal.py", line 8046, 
> in import_from_csv_file 
> >      *args, **kwargs) 
> >    File "E:\My Dropbox\myWebs\MyApps\myeduapps\gluon\dal.py", line 8737, 
> in import_from_csv_file 
> >      curr_id = self.insert(**dict(items)) 
> >    File "E:\My Dropbox\myWebs\MyApps\myeduapps\gluon\dal.py", line 8579, 
> in insert 
> >      ret =  self._db._adapter.insert(self, self._listify(fields)) 
> >    File "E:\My Dropbox\myWebs\MyApps\myeduapps\gluon\dal.py", line 1210, 
> in insert 
> >      raise e 
> > IntegrityError: column title is not unique 
> > 
> > 
> > 
> > El mi�rcoles, 19 de junio de 2013 17:31:49 UTC+2, Christian Foster 
> Howes 
> > escribi�: 
> >> 
> >> I haven't used that code in a long time as my tables are too big. :( 
> >> 
> >> what's the traceback that you get? 
> >> 
> >> On 6/19/13 7:23 , peibol wrote: 
> >>> Bigtable. I don't have any other models but the standard auth ones and 
> >> the 
> >>> builtin wiki ones and I'm using this code (just the one stated in the 
> >> book): 
> >>> 
> >>> def import_and_sync(): 
> >>>       form = FORM(INPUT(_type='file', _name='data'), 
> >> INPUT(_type='submit')) 
> >>>       if form.process().accepted: 
> >>>           db.import_from_csv_file(form.vars.data.file,unique=False) 
> >>>           # for every table 
> >>>           for table in db.tables: 
> >>>               # for every uuid, delete all but the latest 
> >>>               items = db(db[table]).select(db[table].id, 
> >>>                          db[table].uuid, 
> >>>                          orderby=db[table].modified_on, 
> >>>                          groupby=db[table].uuid) 
> >>>               for item in items: 
> >>> 
> >>> db((db[table].uuid==item.uuid)&(db[table].id!=item.id)).delete() 
> >>>       return dict(form=form) 
> >>> 
> >>> 
> >>> def export(): 
> >>>       s = cStringIO.StringIO() 
> >>>       db.export_to_csv_file(s) 
> >>>       response.headers['Content-Type'] = 'text/csv' 
> >>>       return s.getvalue() 
> >>> 
> >>> 
> >>> 
> >>> 
> >>> 
> >>> El mi�rcoles, 19 de junio de 2013 15:14:57 UTC+2, Christian Foster 
> >> Howes 
> >>> escribi�: 
> >>>> 
> >>>> Are you using BigTable or Google Cloud SQL for data storage?  i'm 
> >>>> surprised that import to BigTable would give an integrity error. 
> >>>> 
> >>>> note that if you are import/export as a controller you will be 
> limited 
> >>>> by what you can do in 128MB of ram and 60 seconds of processing 
> unless 
> >>>> you use larger instance classes and/or backend instances. 
> >>>> 
> >>>> cfh 
> >>>> 
> >>>> On 6/19/13 4:05 , peibol wrote: 
> >>>>> Thanks Cristian. What I'm considering is use a export/import 
> function 
> >> in 
> >>>>> the app, only visible to the administrator. Because I want to 
> develop 
> >> a 
> >>>>> kind of wiki, with its content, on local. So I'll use 
> >> export_to_csv_file 
> >>>>> and import_from_csv_file. 
> >>>>> 
> >>>>> The export process is working for me right now, but the import 
> process 
> >>>>> gives an integrity error. 
> >>>>> 
> >>>>> Reading the book, it must be some issue with the uuids... 
> >>>>> 
> >>>>> 
> >>>>> 
> >>>>> El mi�rcoles, 19 de junio de 2013 07:28:02 UTC+2, Christian Foster 
> >>>> Howes 
> >>>>> escribi�: 
> >>>>>> 
> >>>>>>     i wouldn't copy data personally, i consider localhost a test 
> >>>> environment, 
> >>>>>> and GAE proper production and i just make my production data there. 
> >>>>>> 
> >>>>>> if you do want to copy data look at the GAE bulk loader: 
> >>>>>> 
> >> https://developers.google.com/appengine/docs/python/tools/uploadingdata 
> >>>>> 
> >>>> 
> >>> 
> >> 
> > 
>

-- 

--- 
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/groups/opt_out.


TABLE auth_user
auth_user.id,auth_user.first_name,auth_user.last_name,auth_user.email,auth_user.password,auth_user.registration_key,auth_user.reset_password_key,auth_user.registration_id
3,Pablo,B,pru...@mail.com,"pbkdf2(1000,20,sha512)$b3e2f3082a72dd6f$da627815addc70b06d18f34f2214e333256f61f1",,,


TABLE auth_group
auth_group.id,auth_group.role,auth_group.description
4,user_3,Group uniquely assigned to user 3
5,wiki_editor,<NULL>


TABLE auth_membership
auth_membership.id,auth_membership.user_id,auth_membership.group_id
4,3,4
5,3,5


TABLE auth_permission


TABLE auth_event
auth_event.id,auth_event.time_stamp,auth_event.client_ip,auth_event.user_id,auth_event.origin,auth_event.description
1,2013-06-15 22:32:18,127.0.0.1,<NULL>,auth,Group 1 created
3,2013-06-17 22:06:41,127.0.0.1,<NULL>,auth,Group 2 created
8,2013-06-19 00:08:16,127.0.0.1,2,auth,User 2 Logged-out
9,2013-06-19 13:52:36,127.0.0.1,<NULL>,auth,Group 4 created
10,2013-06-19 13:52:36,127.0.0.1,3,auth,User 3 Registered


TABLE auth_cas


TABLE wiki_page
wiki_page.id,wiki_page.slug,wiki_page.title,wiki_page.body,wiki_page.tags,wiki_page.can_read,wiki_page.can_edit,wiki_page.changelog,wiki_page.html,wiki_page.is_active,wiki_page.created_on,wiki_page.created_by,wiki_page.modified_on,wiki_page.modified_by
4,eso1,1? de ESO,"#1? de ESO

##N?meros
-T1 N?meros naturales 
-T2 Divisibilidad 
-T3 N?meros enteros 
-T4 N?meros decimales  	
-T5 Fracciones

##?lgebra
-T6 Proporcionalidad 
-T7 Expresiones algebraicas 
  
##Geometr?a
-T8 Geometr?a del plano
-T9 Pol?gonos. Per?metros y ?reas  
-T10 Circunferencia y c?rculo 
 
##Funciones y gr?ficas
-T11 Tablas y gr?ficas

##Estad?stica y probabilidad
-T12 Gr?ficos estad?sticos y Probabilidad",|?ndice|eso1|,|everybody|,|user_3|,,"<h1>1? de ESO</h1><h2>N?meros</h2><ul><li>T1 N?meros naturales</li><li>T2 Divisibilidad</li><li>T3 N?meros enteros</li><li>T4 N?meros decimales</li><li>T5 Fracciones</li></ul><h2>?lgebra</h2><ul><li>T6 Proporcionalidad</li><li>T7 Expresiones algebraicas</li></ul><h2>Geometr?a</h2><ul><li>T8 Geometr?a del plano</li><li>T9 Pol?gonos. Per?metros y ?reas</li><li>T10 Circunferencia y c?rculo</li></ul><h2>Funciones y gr?ficas</h2><ul><li>T11 Tablas y gr?ficas</li></ul><h2>Estad?stica y probabilidad</h2><ul><li>T12 Gr?ficos estad?sticos y Probabilidad</li></ul><div class=""w2p_wiki_tags""><a href=""/myeducenter/default/index/_search?q=%C3%ADndice"">?ndice</a><a href=""/myeducenter/default/index/_search?q=eso1"">eso1</a></div>",True,2013-06-19 14:14:02,3,2013-06-19 14:25:26,3


TABLE wiki_tag
wiki_tag.id,wiki_tag.name,wiki_tag.wiki_page,wiki_tag.is_active,wiki_tag.created_on,wiki_tag.created_by,wiki_tag.modified_on,wiki_tag.modified_by
3,?ndice,4,True,2013-06-19 14:25:26,3,2013-06-19 14:25:26,3
4,eso1,4,True,2013-06-19 14:25:26,3,2013-06-19 14:25:26,3


TABLE wiki_media


TABLE exercise


END

Reply via email to