> -----Original Message-----
> From: [email protected] On Behalf Of Erick D
> Sent: 23 May 2016 21:18
> 
> Hello fellow Trac users,
> 
> Trac ver: 1.0.1
> 
> 
> I recently installed CodeReviewer plugin:
> https://trac-hacks.org/wiki/CodeReviewerPlugin
> 
> After step 4 - "sudo trac-admin /path/to/projenv upgrade" , the install was a
> success.
> 
> I can login into our test Trac environment mysql db and can see the new
> tables added by this plugin - "codereviewer" and "codereviewer_map".
> Both of the new tables are empty, the instructions state:
> 
> "In order for the Reviewer <https://trac-
> hacks.org/export/HEAD/codereviewerplugin/0.12/coderev/util/reviewer.py>  to
> know all changesets that reference a given ticket, it needs a reliable
> ticket-changeset map. The built-in revision table is unfortunately not
> sufficiently reliable for some version control systems, eg Git. This is a
> known issue. So this plugin comes with its own changeset listener that
> manages a new codereviewer_map table. For existing changesets, you can run a
> provided sync.py <https://trac-
> hacks.org/browser/codereviewerplugin/0.12/coderev/util/sync.py>  utility once
> to populate the table, but should not need it after that."
> 
> I ran Sync.py so it can populate the new tables ... which requires "usage:
> sync.py <db_path> <repo_dir>"
> 
> After running the command "python sync.py /var/lib/location_to_mysql
> /var/public/repositories/test_repo"
> I get the following error:
> 
> File "sync.py", line 78, in <module>
> 
>     sync(db_path, repo_dir)
>   File "sync.py", line 22, in sync
>     db = sqlite3.connect(db_path)
> sqlite3.OperationalError: unable to open database file

Note the references to "sqlite3" ~ it looks like the script expects you to be 
using the default SQLite backend database.  You have said you are using mysql, 
so the script will not work.  I suggest either searching for an update to the 
script that can handle mysql.

If you are interested in learning python, it may be reasonably easy to edit the 
script to handle mysql instead of just sqlite.  A quick look suggests you need 
to:
- import your mysql driver (instead of "import sqlite3")
- update "db = sqlite3.connect(db_path)" (getting a connection to your trac 
mysql database)
- update the "except sqlite3.IntegrityError" exception handler

...always assuming you are targeting a git repository.

> Please advice. I did run the command under root user.

Sadly this is not a permissions issue ~ the script needs to load the right 
driver to talk to mysql.

> Thanks!
> 
> --
> You received this message because you are subscribed to the Google Groups
> "Trac Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at https://groups.google.com/group/trac-users.
> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups "Trac 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/trac-users.
For more options, visit https://groups.google.com/d/optout.

Reply via email to