Edgewall Software
Modify

Opened 11 years ago

Closed 11 years ago

#11400 closed defect (duplicate)

initenv not working with MySQL 5.5

Reported by: andreas@… Owned by:
Priority: normal Milestone:
Component: database backend Version: 1.0.1
Severity: major Keywords: MySQL initenv
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

Description

Hi,

when following instructions on http://trac.edgewall.org/wiki/TracInstall and http://trac.edgewall.org/wiki/TracEnvironment#DatabaseConnectionStrings I get the following error message:

andi@xyz:~/Trac_Projects$ trac-admin GenericShop initenv
Creating a new Trac environment at /home/andi/Trac_Projects/GenericShop

Trac will first ask a few questions about your environment
in order to initialize and prepare the project database.

 Please enter the name of your project.
 This name will be used in page titles and descriptions.

Project Name [My Project]> Generic Shop

 Please specify the connection string for the database to use.
 By default, a local SQLite database is created in the environment
 directory. It is also possible to use an already existing
 PostgreSQL database (check the Trac documentation for the exact
 connection string syntax).

Database connection string [sqlite:db/trac.db]> mysql://trac:abcde@localhost:3306/trac

Creating and Initializing Project
Initenv for '/home/andi/Trac_Projects/GenericShop' failed. 
Failed to create environment.
unsupported operand type(s) for /: 'int' and 'NoneType'
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/Trac-1.0.1-py2.7.egg/trac/admin/console.py", line 456, in do_initenv
    options=options)
  File "/usr/local/lib/python2.7/dist-packages/Trac-1.0.1-py2.7.egg/trac/core.py", line 124, in __call__
    self.__init__(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/Trac-1.0.1-py2.7.egg/trac/env.py", line 281, in __init__
    self.create(options)
  File "/usr/local/lib/python2.7/dist-packages/Trac-1.0.1-py2.7.egg/trac/env.py", line 584, in create
    DatabaseManager(self).init_db()
  File "/usr/local/lib/python2.7/dist-packages/Trac-1.0.1-py2.7.egg/trac/db/api.py", line 251, in init_db
    connector.init_db(**args)
  File "/usr/local/lib/python2.7/dist-packages/Trac-1.0.1-py2.7.egg/trac/db/mysql_backend.py", line 117, in init_db
    for stmt in self.to_sql(table, utf8_size=utf8_size):
  File "/usr/local/lib/python2.7/dist-packages/Trac-1.0.1-py2.7.egg/trac/db/mysql_backend.py", line 166, in to_sql
    utf8_size=utf8_size))
  File "/usr/local/lib/python2.7/dist-packages/Trac-1.0.1-py2.7.egg/trac/db/mysql_backend.py", line 130, in _collist
    limit_col = 767 / utf8_size
TypeError: unsupported operand type(s) for /: 'int' and 'NoneType'

Prior to executing this I created the database and user and checked the login. Using SQLite on the other hand, initenv is running…

Attachments (0)

Change History (1)

comment:1 by Ryan J Ollos, 11 years ago

Resolution: duplicate
Status: newclosed

Duplicate of #10993 and #10897. The database must be InnoDB engine with a UTF8 character set.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The ticket will remain with no owner.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from (none) to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.