Modify

Opened 16 years ago

Closed 12 years ago

#3704 closed defect (wontfix)

Migration partially fails without visible diagnostics on Unicode errors

Reported by: checat@… Owned by: John Hampton
Priority: normal Component: SqliteToPgScript
Severity: critical Keywords:
Cc: Trac Release: 0.11

Description

Migration fails for my installation of trac with additional http://www.trac-hacks.org/wiki/TimingAndEstimationPlugin

First of all, there were no diagnostics on console!

Output was:

$ python sqlite2pg -e env -p 'postgres://www:@/trac'
Timing and Estimation needs an upgrade
Upgrading Database
Creating bill_date table
Creating report_version table
Upgrading report_version table to v4
Dropping report_version table
Upgrading reports
Upgrading usermanual
Done Upgrading

But in reality (in pg_log) there are messages:

ERROR:  relation "bill_date" does not exist
ERROR:  relation "report_version"  does not exist

This situation must be detected at least.

In result only some part of tickets was migrated.

Attachments (0)

Change History (3)

comment:1 Changed 16 years ago by anonymous

I've found the reason of failure. It's unrelated to mentioned log entries and output.

One of tickets appears to contain non-UTF-8 data whcih cannot be decoded by pysqlite2 adapter.

>>> from pysqlite2 import dbapi2 as sqlite
>>> conn = sqlite.connect('./trac.db')
>>> c = conn.cursor()
>>> c.execute('select * from ticket')
<pysqlite2.dbapi2.Cursor object at 0xb7f131a0>
>>> for row in c :
...   pass
...
pysqlite2.dbapi2.OperationalError: Could not decode to UTF-8 column 'description' with text ' ........

But the ticket still applies. Trac itself complains accessing this ticket, but sqlite2pg doesn't, silently failing in 'for' operator, but it should complain.

comment:2 Changed 16 years ago by anonymous

Summary: Migration partially fails without visible diagnosticsMigration partially fails without visible diagnostics on Unicode errors

comment:3 Changed 12 years ago by Ryan J Ollos

Resolution: wontfix
Status: newclosed

This plugin is deprecated. See the TracMigratePlugin.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain John Hampton.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.