Wow I am just having lots of problems tonight, Ok so creating my table on a fresh mysql database causes this error.
This key error happens on the following fields Field('booty_url', length=300), Field('tank_data', 'text')) Traceback (most recent call last): File "/home/thadeusb/Applications/web2py-devel/gluon/restricted.py", line 184, in restricted exec ccode in environment File "/home/thadeusb/Applications/web2py-devel/applications/bootygrab/models/db.py" <http://127.0.0.1:8000/admin/default/edit/bootygrab/models/db.py>, line 76, in <module> Field('tank_data', 'text')) File "/home/thadeusb/Applications/web2py-devel/gluon/sql.py", line 1130, in define_table query = t._create(migrate=migrate) File "/home/thadeusb/Applications/web2py-devel/gluon/sql.py", line 1470, in _create self._db._execute(query) File "/home/thadeusb/Applications/web2py-devel/gluon/sql.py", line 805, in <lambda> self._execute = lambda *a, **b: self._cursor.execute(*a, **b) File "/usr/lib/python2.6/site-packages/MySQLdb/cursors.py", line 173, in execute self.errorhandler(self, exc, value) File "/usr/lib/python2.6/site-packages/MySQLdb/connections.py", line 36, in defaulterrorhandler raise errorclass, errorvalue OperationalError: (1071, 'Specified key was too long; max key length is 767 bytes') -Thadeus On Thu, Oct 22, 2009 at 10:34 PM, mdipierro <mdipie...@cs.depaul.edu> wrote: > > No because the web2py <1.68 did not enforce size, 1.68 does. > > Massimo > > On Oct 22, 10:11 pm, Thadeus Burgess <thade...@thadeusb.com> wrote: > > That was it. It was the tank_data field. > > > > Here is an example of what gets stored in the field. It seems like if I > am > > able to insert this much data, import_from_csv should be able to import > it > > as well? > > > > > http://gaiaonline.com/chat/gsi/gateway.php?v=json&m=[[6500,[1]],[6510,[%222137385%22,0]],[6511,[%222137385%22,1]],[6512,[%222137385%22,1]],[107,[%22null%22]]]&X=1256164219 > > > > -Thadeus > > > > On Thu, Oct 22, 2009 at 10:07 PM, Thadeus Burgess <thade...@thadeusb.com > >wrote: > > > > > I tried changing 'wb', to 'w' > > > > > Unfortunately, open office freezes when trying to open it.... > > > > > here is my sql.loghttp://pastebin.com/m4ea163df > > > > > I did not alter any columns that would have truncated data. > > > > > There is however, the text field in table booty. tank_data. > > > > > This is a massive string of JSON.. massive. like... thats what takes up > > > 40mb of my 62mb database. > > > > > If anything, this field is causing the error. > > > > > Is there any way to not export this column (I don't need the JSON, it > will > > > get replaced on the next update). Is it save to remove the Field() from > the > > > db.define_table, delete the database files (to start from fresh) and > then > > > add the Field declaration again right before import? > > > > > -Thadeus > > > > > On Thu, Oct 22, 2009 at 9:50 PM, mdipierro <mdipie...@cs.depaul.edu > >wrote: > > > > >> think the problem may be that you had corrupted data in the db in > > >> the first place (like you stored somet > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web2py@googlegroups.com To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/web2py?hl=en -~----------~----~----~----~------~----~------~--~---