dnephin / TracAdvancedSearchPlugin

A plugin for Trac that provides an extension point for attaching a full text search engine. Including a backend for Solr.
ISC License
19 stars 8 forks source link

Trac detected an internal error: TypeError: Element() keywords must be strings #28

Open jaredbownds opened 10 years ago

jaredbownds commented 10 years ago

Hi there. I have everything setup and working, except I receive the following error when attempting to create/modify a request. I did some online research which suggested upgrading lxml. As a result, I have upgraded from 2.2.3 to 3.3.3 but the problem still persists. Any idea on how to resolve this issue?

File "/usr/lib/python2.6/site-packages/Trac-1.0.1-py2.6.egg/trac/web/main.py", line 497, in _dispatch_request dispatcher.dispatch(req) File "/usr/lib/python2.6/site-packages/Trac-1.0.1-py2.6.egg/trac/web/main.py", line 214, in dispatch resp = chosen_handler.process_request(req) File "/usr/lib/python2.6/site-packages/Trac-1.0.1-py2.6.egg/trac/ticket/web_ui.py", line 179, in process_request return self._process_ticket_request(req) File "/usr/lib/python2.6/site-packages/Trac-1.0.1-py2.6.egg/trac/ticket/web_ui.py", line 614, in _process_ticket_request self._do_save(req, ticket, action) File "/usr/lib/python2.6/site-packages/Trac-1.0.1-py2.6.egg/trac/ticket/web_ui.py", line 1328, in _do_save replyto=req.args.get('replyto')) File "/usr/lib/python2.6/site-packages/Trac-1.0.1-py2.6.egg/trac/ticket/model.py", line 365, in save_changes listener.ticket_changed(self, comment, author, old_values) File "build/bdist.linux-x86_64/egg/tracadvsearch/advsearch.py", line 400, in ticket_changed self.ticket_created(ticket) File "build/bdist.linux-x86_64/egg/tracadvsearch/advsearch.py", line 387, in ticket_created provider.upsert_document(doc) File "build/bdist.linux-x86_64/egg/tracadvsearch/backend.py", line 229, in upsert_document self.indexer.upsert(doc) File "build/bdist.linux-x86_64/egg/tracadvsearch/backend.py", line 76, in upsert self.backend.conn.add([doc]) File "/usr/lib/python2.6/site-packages/pysolr-3.1.0-py2.6.egg/pysolr.py", line 770, in add message.append(self._build_doc(doc, boost=boost)) File "/usr/lib/python2.6/site-packages/pysolr-3.1.0-py2.6.egg/pysolr.py", line 725, in _build_doc field = ET.Element('field', **attrs) File "lxml.etree.pyx", line 2336, in lxml.etree.Element (src/lxml/lxml.etree.c:46576)

t2y commented 10 years ago

This issue is not from tracadvsearch. Did you look pysolr's issue list? However, in my environment, lxml-3.3.3 is works well. How about upgrading these package?

$ pip freeze
Trac-1.0.2dev_r12523-py2.7-1.0-stable-r12629
TracAdvancedSearchPlugin@0af6dbfb619b029ba27c79a1e076d986ed542407#egg=TracAdvancedSearch-dev
lxml==3.3.3
pysolr==3.2.0
jaredbownds commented 10 years ago

It looks like the issue was resolved by upgrading lxml AND restarting httpd. Thanks for the prompt reply.

(! 1076)-> pip freeze pysolr==3.1.0 lxml==3.3.3

Jared Bownds BLX Informatics

o. 530-746-3466 m. 914-224-2324

From: Tetsuya Morimoto [mailto:notifications@github.com] Sent: Tuesday, April 01, 2014 1:35 PM To: dnephin/TracAdvancedSearchPlugin Cc: Jared Bownds Subject: Re: [TracAdvancedSearchPlugin] Trac detected an internal error: TypeError: Element() keywords must be strings (#28)

This issue is not from tracadvsearch. Did you look pysolr's issue list? However, in my environment, lxml-3.3.3 is works well. How about upgrading these package?

$ pip freeze

Trac-1.0.2dev_r12523-py2.7-1.0-stable-r12629

TracAdvancedSearchPlugin@0af6dbfb619b029ba27c79a1e076d986ed542407#egg=TracAdvancedSearch-dev

lxml==3.3.3

pysolr==3.2.0

— Reply to this email directly or view it on GitHubhttps://github.com/dnephin/TracAdvancedSearchPlugin/issues/28#issuecomment-39255229.


The information contained in this e-mail is for the exclusive use of the intended recipient(s) and may be confidential, proprietary, and/or legally privileged. Inadvertent disclosure of this message does not constitute a waiver of any privilege. If you receive this message in error, please do not directly or indirectly use, print, copy, forward, or disclose any part of this message. Please also delete this e-mail and all copies and notify the sender. Thank you.

For alternate languages please go to http://bayerdisclaimer.bayerweb.com