Modify

Opened 6 years ago

Closed 2 years ago

#3704 closed defect (wontfix)

Migration partially fails without visible diagnostics on Unicode errors

Reported by: checat@… Owned by: pacopablo
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 6 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 6 years ago by anonymous

  • Summary changed from Migration partially fails without visible diagnostics to Migration partially fails without visible diagnostics on Unicode errors

comment:3 Changed 2 years ago by rjollos

  • Resolution set to wontfix
  • Status changed from new to closed

This plugin is deprecated. See the TracMigratePlugin.

Add Comment

Modify Ticket

Action
as closed .
The resolution will be deleted. Next status will be 'reopened'.
Author


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

 
Note: See TracTickets for help on using tickets.