Yes I had this error message once, I don't remember exactly how i get
around this though... I think what happen was I changed an attribute
of the database table  and "migrate" was set to "True" and I got that
error message... And then I set migrate to False... And i think that
day I restore my database and clean up everything since I was doing
some testing on my application...

I hope it helps... Please let us know what exactly happen before you
get that error message ?

Cheers,
Yannick P.
On Oct 13, 9:48 am, Rick <richard.h....@gmail.com> wrote:
> I have also come across this with web2py 1.67.2, using stock MySQL on
> Ubuntu 8.10, when I add unique=True to a string column in a table
> definition.
>
> On Sep 22, 11:13 am, Yannick <ytchatch...@gmail.com> wrote:
>
>
>
> > Hello mate,
> > Below you can find the error message that I received from Database
> > (MySQL) when using the latest Web2py version: 1.67.1 BUT when I use an
> > old version Web2py: 1.66.2, I have NO problem NO error using the same
> > environment...
> > I wonder why this new release complaint ?????
>
> > Please let me if you have any hint ???
>
> > Traceback (most recent call last):
> >   File "/home/fedora/src/web2py/gluon/restricted.py", line 178, in
> > restricted
> >     exec ccode in environment
> >   File "/home/fedora/src/web2py/applications/AppName/models/db.py",
> > line 104, in <module>
> >     buDefineTable.define_tables()
> >   File "/home/fedora/src/web2py/applications/AppName/modules/
> > dbDefinition.py", line 126, in define_tables
> >     migrate = True)
> >   File "/home/fedora/src/web2py/gluon/sql.py", line 1033, in
> > define_table
> >     query = t._create(migrate=migrate)
> >   File "/home/fedora/src/web2py/gluon/sql.py", line 1368, in _create
> >     self._db._execute(query)
> >   File "/home/fedora/src/web2py/gluon/sql.py", line 739, 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, 'Specifiedkeywastoolong; maxkeylength
> > is 767 bytes')
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to