Mailing List Archive

TypeError: sequence item 1: expected string, array.array found
Hello folks

I'm a newbie when it comes to Trac and Python.

We had a crash on our SAN (three disk crashes within 20 minutes). The
was partial backup of our Trac server. We had mysql and environment
but not /usr backup. This meant that we had to reinstall the trac
server from scratch and import the database into it. Almost everything
are working now. there is just one thing that is failing. When we are
clicking on a change set we get: "TypeError: sequence item 1: expected
string, array.array found"

It is probably an easy fix (I hope)

Here is the debug log and below that are the system environment and
activated plugins:

2011-04-12 12:58:40,749 Trac[env] INFO:
-------------------------------- environment startup [Trac 0.12.2]
--------------------------------
2011-04-12 12:58:40,759 Trac[loader] DEBUG: Loading TracXMLRPC from /
usr/lib/python2.4/site-packages/TracXMLRPC-1.1.2_r9970-py2.4.egg
2011-04-12 12:58:40,759 Trac[loader] DEBUG: Loading codereview from /
usr/lib/python2.4/site-packages/CodeReview-0.1-py2.4.egg
2011-04-12 12:58:40,760 Trac[loader] ERROR: Skipping "codereview =
codereview":
Traceback (most recent call last):
File "build/bdist.linux-x86_64/egg/trac/loader.py", line 68, in
_load_eggs
File "/usr/lib/python2.4/site-packages/setuptools-0.6c12dev_r88795-
py2.4.egg/pkg_resources.py", line 1954, in load
entry = __import__(self.module_name, globals(),globals(),
['__name__'])
IOError: zipimport: can not open file /usr/lib/python2.4/site-packages/
CodeReview-0.1-py2.4.egg
2011-04-12 12:58:40,760 Trac[loader] DEBUG: Loading codereview from /
usr/lib/python2.4/site-packages/TracCodeReview-2.0dev-py2.4.egg
2011-04-12 12:58:40,760 Trac[loader] ERROR: Skipping "codereview =
codereview":
Traceback (most recent call last):
File "build/bdist.linux-x86_64/egg/trac/loader.py", line 68, in
_load_eggs
File "/usr/lib/python2.4/site-packages/setuptools-0.6c12dev_r88795-
py2.4.egg/pkg_resources.py", line 1954, in load
entry = __import__(self.module_name, globals(),globals(),
['__name__'])
IOError: zipimport: can not open file /usr/lib/python2.4/site-packages/
CodeReview-0.1-py2.4.egg
2011-04-12 12:58:40,761 Trac[loader] DEBUG: Loading graphviz from /usr/
lib/python2.4/site-packages/graphviz-0.7.6dev-py2.4.egg
2011-04-12 12:58:40,761 Trac[loader] DEBUG: Loading mastertickets.api
from /usr/lib/python2.4/site-packages/TracMasterTickets-3.0.2-
py2.4.egg
2011-04-12 12:58:40,761 Trac[loader] DEBUG: Loading
mastertickets.web_ui from /usr/lib/python2.4/site-packages/
TracMasterTickets-3.0.2-py2.4.egg
2011-04-12 12:58:40,761 Trac[loader] DEBUG: Loading
timingandestimationplugin from /usr/lib/python2.4/site-packages/
timingandestimationplugin-1.1.2-py2.4.egg
2011-04-12 12:58:40,761 Trac[loader] DEBUG: Loading trac.about from /
usr/lib/python2.4/site-packages/Trac-0.12.2-py2.4.egg
2011-04-12 12:58:40,761 Trac[loader] DEBUG: Loading trac.admin.console
from /usr/lib/python2.4/site-packages/Trac-0.12.2-py2.4.egg
2011-04-12 12:58:40,762 Trac[loader] DEBUG: Loading trac.admin.web_ui
from /usr/lib/python2.4/site-packages/Trac-0.12.2-py2.4.egg
2011-04-12 12:58:40,762 Trac[loader] DEBUG: Loading trac.attachment
from /usr/lib/python2.4/site-packages/Trac-0.12.2-py2.4.egg
2011-04-12 12:58:40,762 Trac[loader] DEBUG: Loading trac.db.mysql
from /usr/lib/python2.4/site-packages/Trac-0.12.2-py2.4.egg
2011-04-12 12:58:40,762 Trac[loader] DEBUG: Loading trac.db.postgres
from /usr/lib/python2.4/site-packages/Trac-0.12.2-py2.4.egg
2011-04-12 12:58:40,762 Trac[loader] DEBUG: Loading trac.db.sqlite
from /usr/lib/python2.4/site-packages/Trac-0.12.2-py2.4.egg
2011-04-12 12:58:40,763 Trac[loader] DEBUG: Loading
trac.mimeview.patch from /usr/lib/python2.4/site-packages/Trac-0.12.2-
py2.4.egg
2011-04-12 12:58:40,763 Trac[loader] DEBUG: Loading
trac.mimeview.pygments from /usr/lib/python2.4/site-packages/
Trac-0.12.2-py2.4.egg
2011-04-12 12:58:40,771 Trac[loader] DEBUG: Skipping
"trac.mimeview.pygments = trac.mimeview.pygments [pygments]":
("DistributionNotFound: Pygments>=0.6" not found)
2011-04-12 12:58:40,772 Trac[loader] DEBUG: Loading trac.mimeview.rst
from /usr/lib/python2.4/site-packages/Trac-0.12.2-py2.4.egg
2011-04-12 12:58:40,780 Trac[loader] DEBUG: Skipping
"trac.mimeview.rst = trac.mimeview.rst [rest]":
("DistributionNotFound: docutils>=0.3" not found)
2011-04-12 12:58:40,780 Trac[loader] DEBUG: Loading
trac.mimeview.silvercity from /usr/lib/python2.4/site-packages/
Trac-0.12.2-py2.4.egg
2011-04-12 12:58:40,789 Trac[loader] DEBUG: Skipping
"trac.mimeview.silvercity = trac.mimeview.silvercity [silvercity]":
("DistributionNotFound: SilverCity>=0.9.4" not found)
2011-04-12 12:58:40,790 Trac[loader] DEBUG: Loading trac.mimeview.txtl
from /usr/lib/python2.4/site-packages/Trac-0.12.2-py2.4.egg
2011-04-12 12:58:40,798 Trac[loader] DEBUG: Skipping
"trac.mimeview.txtl = trac.mimeview.txtl [textile]":
("DistributionNotFound: textile>=2.0" not found)
2011-04-12 12:58:40,798 Trac[loader] DEBUG: Loading trac.prefs from /
usr/lib/python2.4/site-packages/Trac-0.12.2-py2.4.egg
2011-04-12 12:58:40,798 Trac[loader] DEBUG: Loading trac.search from /
usr/lib/python2.4/site-packages/Trac-0.12.2-py2.4.egg
2011-04-12 12:58:40,799 Trac[loader] DEBUG: Loading trac.ticket.admin
from /usr/lib/python2.4/site-packages/Trac-0.12.2-py2.4.egg
2011-04-12 12:58:40,799 Trac[loader] DEBUG: Loading trac.ticket.query
from /usr/lib/python2.4/site-packages/Trac-0.12.2-py2.4.egg
2011-04-12 12:58:40,799 Trac[loader] DEBUG: Loading trac.ticket.report
from /usr/lib/python2.4/site-packages/Trac-0.12.2-py2.4.egg
2011-04-12 12:58:40,799 Trac[loader] DEBUG: Loading
trac.ticket.roadmap from /usr/lib/python2.4/site-packages/Trac-0.12.2-
py2.4.egg
2011-04-12 12:58:40,799 Trac[loader] DEBUG: Loading trac.ticket.web_ui
from /usr/lib/python2.4/site-packages/Trac-0.12.2-py2.4.egg
2011-04-12 12:58:40,800 Trac[loader] DEBUG: Loading trac.timeline
from /usr/lib/python2.4/site-packages/Trac-0.12.2-py2.4.egg
2011-04-12 12:58:40,800 Trac[loader] DEBUG: Loading
trac.versioncontrol.admin from /usr/lib/python2.4/site-packages/
Trac-0.12.2-py2.4.egg
2011-04-12 12:58:40,800 Trac[loader] DEBUG: Loading
trac.versioncontrol.svn_authz from /usr/lib/python2.4/site-packages/
Trac-0.12.2-py2.4.egg
2011-04-12 12:58:40,800 Trac[loader] DEBUG: Loading
trac.versioncontrol.svn_fs from /usr/lib/python2.4/site-packages/
Trac-0.12.2-py2.4.egg
2011-04-12 12:58:40,800 Trac[loader] DEBUG: Loading
trac.versioncontrol.svn_prop from /usr/lib/python2.4/site-packages/
Trac-0.12.2-py2.4.egg
2011-04-12 12:58:40,801 Trac[loader] DEBUG: Loading
trac.versioncontrol.web_ui from /usr/lib/python2.4/site-packages/
Trac-0.12.2-py2.4.egg
2011-04-12 12:58:40,801 Trac[loader] DEBUG: Loading trac.web.auth
from /usr/lib/python2.4/site-packages/Trac-0.12.2-py2.4.egg
2011-04-12 12:58:40,801 Trac[loader] DEBUG: Loading trac.web.session
from /usr/lib/python2.4/site-packages/Trac-0.12.2-py2.4.egg
2011-04-12 12:58:40,801 Trac[loader] DEBUG: Loading trac.wiki.admin
from /usr/lib/python2.4/site-packages/Trac-0.12.2-py2.4.egg
2011-04-12 12:58:40,801 Trac[loader] DEBUG: Loading
trac.wiki.interwiki from /usr/lib/python2.4/site-packages/Trac-0.12.2-
py2.4.egg
2011-04-12 12:58:40,802 Trac[loader] DEBUG: Loading trac.wiki.macros
from /usr/lib/python2.4/site-packages/Trac-0.12.2-py2.4.egg
2011-04-12 12:58:40,802 Trac[loader] DEBUG: Loading trac.wiki.web_api
from /usr/lib/python2.4/site-packages/Trac-0.12.2-py2.4.egg
2011-04-12 12:58:40,802 Trac[loader] DEBUG: Loading trac.wiki.web_ui
from /usr/lib/python2.4/site-packages/Trac-0.12.2-py2.4.egg
2011-04-12 12:58:40,802 Trac[loader] DEBUG: Loading
tracopt.mimeview.enscript from /usr/lib/python2.4/site-packages/
Trac-0.12.2-py2.4.egg
2011-04-12 12:58:40,802 Trac[loader] DEBUG: Loading
tracopt.mimeview.php from /usr/lib/python2.4/site-packages/Trac-0.12.2-
py2.4.egg
2011-04-12 12:58:40,803 Trac[loader] DEBUG: Loading
tracopt.perm.authz_policy from /usr/lib/python2.4/site-packages/
Trac-0.12.2-py2.4.egg
2011-04-12 12:58:40,803 Trac[loader] DEBUG: Loading
tracopt.perm.config_perm_provider from /usr/lib/python2.4/site-
packages/Trac-0.12.2-py2.4.egg
2011-04-12 12:58:40,803 Trac[loader] DEBUG: Loading
tracopt.ticket.commit_updater from /usr/lib/python2.4/site-packages/
Trac-0.12.2-py2.4.egg
2011-04-12 12:58:40,803 Trac[loader] DEBUG: Loading
tracopt.ticket.deleter from /usr/lib/python2.4/site-packages/
Trac-0.12.2-py2.4.egg
2011-04-12 12:58:40,803 Trac[loader] DEBUG: Loading whiteboard.web_ui
from /usr/lib/python2.4/site-packages/whiteboard-0.1.0_trac0.12-
py2.5.egg
2011-04-12 12:58:40,811 Trac[default_workflow] DEBUG: Workflow actions
at initialization: {u'resolve': {u'operations': [u'set_resolution'],
'name': u'resolve', 'default': 0, 'newstate': u'closed', 'oldstates':
[u'new', u'assigned', u'accepted', u'reopened'], u'permissions':
[u'TICKET_MODIFY']}, u'accept': {u'operations':
[u'set_owner_to_self'], 'name': u'accept', 'default': 0, 'newstate':
u'accepted', 'oldstates': [u'new', u'assigned', u'accepted',
u'reopened'], u'permissions': [u'TICKET_MODIFY']}, u'leave':
{u'operations': [u'leave_status'], 'name': u'leave', u'default': 1,
'newstate': u'*', 'oldstates': [u'*'], 'permissions': []}, u'reopen':
{u'operations': [u'del_resolution'], 'name': u'reopen', 'default': 0,
'newstate': u'reopened', 'oldstates': [u'closed'], u'permissions':
[u'TICKET_CREATE']}, u'reassign': {u'operations': [u'set_owner'],
'name': u'reassign', 'default': 0, 'newstate': u'assigned',
'oldstates': [u'new', u'assigned', u'accepted', u'reopened'],
u'permissions': [u'TICKET_MODIFY']}, '_reset': {'operations':
['reset_workflow'], 'name': 'reset', 'default': 0, 'newstate': 'new',
'oldstates': [], 'permissions': []}}

2011-04-12 12:58:40,812 Trac[main] DEBUG: Dispatching <Request "GET '/
changeset/22787'">
2011-04-12 12:58:40,812 Trac[graphviz] INFO: version: 0.7.5dev - id:
$Id: graphviz.py 5900 2009-05-30 11:05:08Z cboos $
2011-04-12 12:58:40,814 Trac[session] DEBUG: Retrieving session for ID
'erlend'
2011-04-12 12:58:40,815 Trac[main] DEBUG: Negotiated locale: None ->
en_US
2011-04-12 12:58:40,825 Trac[svn_fs] DEBUG: Subversion bindings
imported
2011-04-12 12:58:40,828 Trac[api] INFO: Synchronized '' repository in
0.02 seconds
2011-04-12 12:58:40,829 Trac[api] DEBUG: action controllers for ticket
workflow: ['ConfigurableTicketWorkflow']
2011-04-12 12:58:40,835 Trac[chrome] DEBUG: Prepare chrome data for
request
2011-04-12 12:58:42,849 Trac[main] ERROR: Internal Server Error:
Traceback (most recent call last):
File "build/bdist.linux-x86_64/egg/trac/web/main.py", line 511, in
_dispatch_request
File "build/bdist.linux-x86_64/egg/trac/web/main.py", line 237, in
dispatch
File "build/bdist.linux-x86_64/egg/trac/versioncontrol/web_ui/
changeset.py", line 352, in process_request
File "build/bdist.linux-x86_64/egg/trac/versioncontrol/web_ui/
changeset.py", line 581, in _render_html
File "build/bdist.linux-x86_64/egg/trac/versioncontrol/web_ui/
changeset.py", line 405, in get_changes
File "build/bdist.linux-x86_64/egg/trac/versioncontrol/cache.py",
line 304, in get_node
File "build/bdist.linux-x86_64/egg/trac/versioncontrol/svn_fs.py",
line 454, in get_node
File "build/bdist.linux-x86_64/egg/trac/versioncontrol/svn_fs.py",
line 681, in __init__
File "build/bdist.linux-x86_64/egg/trac/versioncontrol/svn_fs.py",
line 81, in _to_svn
TypeError: sequence item 1: expected string, array.array found



System Information:

User Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.16)
Gecko/20110322 Fedora/3.6.16-1.fc14 Firefox/3.6.16
Trac 0.12.2
Babel 0.9.5
Genshi 0.6
mod_python 3.2.8
MySQL server: "5.0.77", client: "5.0.77", thread-safe: 0
MySQLdb 1.2.1
Python 2.4.3 (#1, Nov 11 2010, 13:30:19) [GCC 4.1.2 20080704 (Red Hat
4.1.2-48)]
RPC 1.1.2-r9970
setuptools 0.6c12
Subversion 1.4.2 (r22196)
jQuery 1.4.2


Enabled Plugins:
graphviz 0.7.6dev /usr/lib/python2.4/site-packages/graphviz-0.7.6dev-
py2.4.egg
trac.about N/A /usr/lib/python2.4/site-packages/trac/about.pyc
trac.admin.api N/A /usr/lib/python2.4/site-packages/trac/admin/
api.pyc
trac.admin.console N/A /usr/lib/python2.4/site-packages/trac/admin/
console.pyc
trac.admin.web-ui N/A /usr/lib/python2.4/site-packages/trac/admin/
web_ui.pyc
trac.attachment N/A /usr/lib/python2.4/site-packages/trac/
attachment.pyc
trac.cache N/A /usr/lib/python2.4/site-packages/trac/cache.pyc
trac.config N/A /usr/lib/python2.4/site-packages/trac/config.pyc
trac.db.api N/A /usr/lib/python2.4/site-packages/trac/db/api.pyc
trac.db.mysql-backend N/A /usr/lib/python2.4/site-packages/trac/db/
mysql_backend.pyc
trac.env N/A /usr/lib/python2.4/site-packages/trac/env.pyc
trac.mimeview.api N/A /usr/lib/python2.4/site-packages/trac/mimeview/
api.pyc
trac.mimeview.patch N/A /usr/lib/python2.4/site-packages/trac/
mimeview/patch.pyc
trac.notification N/A /usr/lib/python2.4/site-packages/trac/
notification.pyc
trac.perm N/A /usr/lib/python2.4/site-packages/trac/perm.pyc
trac.prefs.web-ui N/A /usr/lib/python2.4/site-packages/trac/prefs/
web_ui.pyc
trac.resource N/A /usr/lib/python2.4/site-packages/trac/resource.pyc
trac.search.web-ui N/A /usr/lib/python2.4/site-packages/trac/search/
web_ui.pyc
trac.ticket.admin N/A /usr/lib/python2.4/site-packages/trac/ticket/
admin.pyc
trac.ticket.api N/A /usr/lib/python2.4/site-packages/trac/ticket/
api.pyc
trac.ticket.default-workflow N/A /usr/lib/python2.4/site-packages/
trac/ticket/default_workflow.pyc
trac.ticket.notification N/A /usr/lib/python2.4/site-packages/trac/
ticket/notification.pyc
trac.ticket.query N/A /usr/lib/python2.4/site-packages/trac/ticket/
query.pyc
trac.ticket.report N/A /usr/lib/python2.4/site-packages/trac/ticket/
report.pyc
trac.ticket.roadmap N/A /usr/lib/python2.4/site-packages/trac/ticket/
roadmap.pyc
trac.ticket.web-ui N/A /usr/lib/python2.4/site-packages/trac/ticket/
web_ui.pyc
trac.timeline.web-ui N/A /usr/lib/python2.4/site-packages/trac/
timeline/web_ui.pyc
trac.versioncontrol.admin N/A /usr/lib/python2.4/site-packages/trac/
versioncontrol/admin.pyc
trac.versioncontrol.api N/A /usr/lib/python2.4/site-packages/trac/
versioncontrol/api.pyc
trac.versioncontrol.svn-authz N/A /usr/lib/python2.4/site-packages/
trac/versioncontrol/svn_authz.pyc
trac.versioncontrol.svn-fs N/A /usr/lib/python2.4/site-packages/trac/
versioncontrol/svn_fs.pyc
trac.versioncontrol.svn-prop N/A /usr/lib/python2.4/site-packages/
trac/versioncontrol/svn_prop.pyc
trac.versioncontrol.web-ui.browser N/A /usr/lib/python2.4/site-
packages/trac/versioncontrol/web_ui/browser.pyc
trac.versioncontrol.web-ui.changeset N/A /usr/lib/python2.4/site-
packages/trac/versioncontrol/web_ui/changeset.pyc
trac.versioncontrol.web-ui.log N/A /usr/lib/python2.4/site-packages/
trac/versioncontrol/web_ui/log.pyc
trac.versioncontrol.web-ui.main N/A /usr/lib/python2.4/site-packages/
trac/versioncontrol/web_ui/main.pyc
trac.web.auth N/A /usr/lib/python2.4/site-packages/trac/web/auth.pyc
trac.web.chrome N/A /usr/lib/python2.4/site-packages/trac/web/
chrome.pyc
trac.web.main N/A /usr/lib/python2.4/site-packages/trac/web/main.pyc
trac.web.session N/A /usr/lib/python2.4/site-packages/trac/web/
session.pyc
trac.wiki.admin N/A /usr/lib/python2.4/site-packages/trac/wiki/
admin.pyc
trac.wiki.api N/A /usr/lib/python2.4/site-packages/trac/wiki/api.pyc
trac.wiki.intertrac N/A /usr/lib/python2.4/site-packages/trac/wiki/
intertrac.pyc
trac.wiki.interwiki N/A /usr/lib/python2.4/site-packages/trac/wiki/
interwiki.pyc
trac.wiki.macros N/A /usr/lib/python2.4/site-packages/trac/wiki/
macros.pyc
trac.wiki.parser N/A /usr/lib/python2.4/site-packages/trac/wiki/
parser.pyc
trac.wiki.web-api N/A /usr/lib/python2.4/site-packages/trac/wiki/
web_api.pyc
trac.wiki.web-ui N/A /usr/lib/python2.4/site-packages/trac/wiki/
web_ui.pyc
TracMasterTickets 3.0.2 /usr/lib/python2.4/site-packages/
TracMasterTickets-3.0.2-py2.4.egg
TracXMLRPC 1.1.2-r9970 /usr/lib/python2.4/site-packages/
TracXMLRPC-1.1.2_r9970-py2.4.egg
whiteboard 0.1.0-trac0.12 /usr/lib/python2.4/site-packages/
whiteboard-0.1.0_trac0.12-py2.5.egg

--
You received this message because you are subscribed to the Google Groups "Trac Users" group.
To post to this group, send email to trac-users@googlegroups.com.
To unsubscribe from this group, send email to trac-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/trac-users?hl=en.
Re: TypeError: sequence item 1: expected string, array.array found [ In reply to ]
On 4/12/2011 1:07 PM, Erlend Sannerud wrote:
> ...
> TypeError: sequence item 1: expected string, array.array found
>
> System Information:
> ...
> MySQL server: "5.0.77", client: "5.0.77", thread-safe: 0
> MySQLdb 1.2.1

This is a known issue with this version of the MySQL bindings for Python.
See http://trac.edgewall.org/wiki/MySqlDb#MySQLdb

Also, when you build the new version, pay attention to build it as
thread-safe as explained in the above page (I see thread-safe: 0 in the
above; this is also known to lead to problems).

-- Christian

--
You received this message because you are subscribed to the Google Groups "Trac Users" group.
To post to this group, send email to trac-users@googlegroups.com.
To unsubscribe from this group, send email to trac-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/trac-users?hl=en.
Re: TypeError: sequence item 1: expected string, array.array found [ In reply to ]
Yes! That was just it.

Downloaded: MySQL-python-1.2.3.tar.gz
unpacked it and ran: python setup.py install
restarted apache and it started working again :-D

thanks
Erlend

On Apr 12, 1:26 pm, Christian Boos <cb...@neuf.fr> wrote:
> On 4/12/2011 1:07 PM, Erlend Sannerud wrote:
>
> > ...
> > TypeError: sequence item 1: expected string, array.array found
>
> > System Information:
> > ...
> > MySQL      server: "5.0.77", client: "5.0.77", thread-safe: 0
> > MySQLdb    1.2.1
>
> This is a known issue with this version of the MySQL bindings for Python.
> Seehttp://trac.edgewall.org/wiki/MySqlDb#MySQLdb
>
> Also, when you build the new version, pay attention to build it as
> thread-safe as explained in the above page (I see thread-safe: 0 in the
> above; this is also known to lead to problems).
>
> -- Christian

--
You received this message because you are subscribed to the Google Groups "Trac Users" group.
To post to this group, send email to trac-users@googlegroups.com.
To unsubscribe from this group, send email to trac-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/trac-users?hl=en.