Hi, It seems that your MySQL database is NOT configured with utf8 charset. MySQL database for Trac must be configured with utf8 charset and utf8_bin collation.
See also http://trac.edgewall.org/wiki/MySqlDb#MySQL On Mon, Jul 9, 2012 at 3:32 PM, Bin Hou <[email protected]> wrote: > How to resolve "TypeError: unsupported operand type(s) for /: 'int' and > 'NoneType'", > list info: > [root@beTrac besite_mysql]# trac-admin /var/www/trac/besite_mysql initenv > > database connect string [sqlite:db/trac.db]> > mysql://trac:tracbe@localhost:3306/besite > > create and initlize > '/var/www/trac/besite_mysql' execute initenv fail。 > create fail。 > unsupported operand type(s) for /: 'int' and 'NoneType' > Traceback (most recent call last): > File "build/bdist.linux-x86_64/egg/trac/admin/console.py", line 437, in > do_initenv > options=options) > File "build/bdist.linux-x86_64/egg/trac/env.py", line 214, in __init__ > self.create(options) > File "build/bdist.linux-x86_64/egg/trac/env.py", line 402, in create > DatabaseManager(self).init_db() > File "build/bdist.linux-x86_64/egg/trac/db/api.py", line 146, in init_db > connector.init_db(**args) > File "build/bdist.linux-x86_64/egg/trac/db/mysql_backend.py", line 106, in > init_db > for stmt in self.to_sql(table, utf8_size=utf8_size): > File "build/bdist.linux-x86_64/egg/trac/db/mysql_backend.py", line 155, in > to_sql > utf8_size=utf8_size)) > File "build/bdist.linux-x86_64/egg/trac/db/mysql_backend.py", line 119, in > _collist > limit_col = 767 / utf8_size > TypeError: unsupported operand type(s) for /: 'int' and 'NoneType' -- Jun Omae <[email protected]> (大前 潤) -- You received this message because you are subscribed to the Google Groups "Trac Users" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/trac-users?hl=en.
