Opened 14 years ago

Last modified 13 years ago

#7099 closed defect

ReferenceError: weakly-referenced object no longer exists — at Initial Version

Reported by: support@… Owned by: pdoup
Priority: normal Component: TimelineComponentFilterPlugin
Severity: normal Keywords:
Cc: Trac Release: 0.11

Description

Trac detected an internal error:

ReferenceError: weakly-referenced object no longer exists

This is probably a local installation issue. Found a bug in Trac?

If you think this should work and you can reproduce the problem, you should consider reporting this to the Trac team.

Before you do that, though, please first try searching for similar issues, as it is quite likely that this problem has been reported before. For questions about installation and configuration of Trac, please try the mailing list instead of filing a ticket.

Otherwise, please ==== How to Reproduce ==== While doing a GET operation on /timeline, Trac issued an internal error. (please provide additional details here) User Agent was: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.9) Gecko/20100315 Firefox/3.5.9 ZarafaCheck/1.1.1.20080624.110 ==== System Information ====
Trac 0.11.6 Python 2.4.3 (#1, Sep 3 2009, 15:37:12)
[GCC 4.1.2 20080704 (Red Hat 4.1.2-46)]
setuptools 0.6c7 SQLite 3.3.6 pysqlite 1.1.7 Genshi 0.5.1 mod_python 3.2.8 Subversion 1.4.2 (r22196) jQuery: 1.2.6 ==== Python Traceback ==== Traceback (most recent call last): File "/usr/lib/python2.4/site-packages/Trac-0.11.6-py2.4.egg/trac/web/main.py", line 450, in _dispatch_request dispatcher.dispatch(req) File "/usr/lib/python2.4/site-packages/Trac-0.11.6-py2.4.egg/trac/web/main.py", line 227, in dispatch data, content_type) File "/usr/lib/python2.4/site-packages/Trac-0.11.6-py2.4.egg/trac/web/chrome.py", line 745, in render_template stream |= self._filter_stream(req, method, filename, stream, data) File "/usr/lib/python2.4/site-packages/genshi/core.py", line 128, in __or__ return Stream(_ensure(function(self)), serializer=self.serializer) File "/usr/lib/python2.4/site-packages/Trac-0.11.6-py2.4.egg/trac/web/chrome.py", line 848, in inner data) File "/home/trac/Textkernel/plugins/TimelineComponentFilter.py", line 46, in filter_stream return stream | filter.before(tag.br()) | filter.before(tag.label("Filter Components (none for all): ")) | filter.before(tag.br()) | filter.before(self._components_field_input(req)) File "/home/trac/Textkernel/plugins/TimelineComponentFilter.py", line 51, in _components_field_input cursor.execute("SELECT name FROM component ORDER BY name") File "/usr/lib/python2.4/site-packages/Trac-0.11.6-py2.4.egg/trac/db/util.py", line 65, in execute return self.cursor.execute(sql) File "/usr/lib/python2.4/site-packages/sqlite/main.py", line 233, in execute if self.con.autocommit: ReferenceError: weakly-referenced object no longer exists a new ticket at the Trac project site, where you can describe the problem and explain how to reproduce it.

Python Traceback Most recent call last:

  • File "/usr/lib/python2.4/site-packages/Trac-0.11.6-py2.4.egg/trac/web/main.py", line 450, in _dispatch_request Code fragment:
    1. try:
    2. if not env and env_error:
    3. raise HTTPInternalError(env_error)
    4. try:
    5. dispatcher = RequestDispatcher(env)
    6. dispatcher.dispatch(req)
    7. except RequestDone:
    8. pass
    9. resp = req._response or []
    10. except HTTPException, e:
    Local variables: Name Value after [u' except RequestDone:', u' pass', u' resp = ... before [u' try:', u' if not env and env_error:', u' raise ... dispatcher <trac.web.main.RequestDispatcher object at 0x9159e8c> e <exceptions.ReferenceError instance at 0x91cd50c> env <trac.env.Environment object at 0x90bd8ec> env_error None exc_info (<class exceptions.ReferenceError at 0xb7f94dac>, ... filename '/usr/lib/python2.4/site-packages/Trac-0.11.6-py2.4.egg/trac/web/main.py' frames [{'function': '_dispatch_request', 'lines_before': [u' try:', u' ... has_admin True line u' dispatcher.dispatch(req)' lineno 449 message u'ReferenceError: weakly-referenced object no longer exists' req <Request "GET u'/timeline'"> resp [] tb <traceback object at 0xb7856694> tb_hide None traceback u'Traceback (most recent call last):\n File ...
  • File "/usr/lib/python2.4/site-packages/Trac-0.11.6-py2.4.egg/trac/web/main.py", line 227, in dispatch Code fragment:
    1. out = StringIO()
    2. pprint(data, out)
    3. req.send(out.getvalue(), 'text/plain')
    4. else:
    5. output = chrome.render_template(req, template,
    6. data, content_type)
    7. # Give the session a chance to persist changes
    8. req.session.save()
    9. req.send(output, content_type or 'text/html')
    10. else:
    11. self._post_process_request(req)
    Local variables: Name Value chosen_handler <trac.timeline.web_ui.TimelineModule object at 0x915942c> chrome <trac.web.chrome.Chrome object at 0x91c102c> content_type None data {'dateinfo': <function dateinfo at 0x90bce9c>, 'context': <Context >, ... err (<class exceptions.ReferenceError at 0xb7f94dac>, ... handler <trac.timeline.web_ui.TimelineModule object at 0x915942c> req <Request "GET u'/timeline'"> resp ('timeline.html', {'dateinfo': <function dateinfo at 0x90bce9c>, ... self <trac.web.main.RequestDispatcher object at 0x9159e8c> template 'timeline.html'
  • File "/usr/lib/python2.4/site-packages/Trac-0.11.6-py2.4.egg/trac/web/chrome.py", line 745, in render_template Code fragment:
    1. stream = template.generate(data)
    2. # Filter through ITemplateStreamFilter plugins
    3. if self.stream_filters:
    4. stream |= self._filter_stream(req, method, filename, stream, data)
    5. if fragment:
    6. return stream
    7. if method == 'text':
    Local variables: Name Value content_type 'text/html' data {'abs_url_of': <function get_abs_url at 0xb780c1b4>, 'all': <function all ... filename 'timeline.html' fragment False i 0 method 'xhtml' req <Request "GET u'/timeline'"> self <trac.web.chrome.Chrome object at 0x91c102c> stream <genshi.core.Stream object at 0x91cd76c> template <MarkupTemplate "timeline.html"> type_ 'notices'
  • File "/usr/lib/python2.4/site-packages/genshi/core.py", line 128, in or Code fragment:

123.

  1. :param function: the callable object that should be applied as a filter
  2. :return: the filtered stream
  3. :rtype: Stream
  4. """
  5. return Stream(_ensure(function(self)), serializer=self.serializer)
  6. def filter(self, *filters):
  7. """Apply filters to the stream. 132.
  8. This method returns a new stream with the given filters applied. The

Local variables: Name Value function <function inner at 0xb780c454> self <genshi.core.Stream object at 0x91cd76c>

  • File "/usr/lib/python2.4/site-packages/Trac-0.11.6-py2.4.egg/trac/web/chrome.py", line 848, in inner Code fragment:
    1. def _filter_stream(self, req, method, filename, stream, data):
    2. def inner(stream, ctxt=None):
    3. for filter in self.stream_filters:
    4. stream = filter.filter_stream(req, method, filename, stream,
    5. data)
    6. return stream
    7. return inner
    8. def _stream_location(self, stream):
    9. for kind, data, pos in stream:
    Local variables: Name Value ctxt None data {'abs_url_of': <function get_abs_url at 0xb780c1b4>, 'all': <function all ... filename 'timeline.html' filter <TimelineComponentFilter.TimelineComponentFilterPlugin object at ... method 'xhtml' req <Request "GET u'/timeline'"> self <trac.web.chrome.Chrome object at 0x91c102c> stream <genshi.core.Stream object at 0x914c80c>
  • File "/home/trac/Textkernel/plugins/TimelineComponentFilter.py", line 46, in filter_stream Code fragment:
    1. def filter_stream(self, req, method, filename, stream, data):
    2. if filename == 'timeline.html':
    3. # Insert the new field for entering user names
    4. filter = Transformer('form[@id="prefs"]/fieldset')
    5. return stream | filter.before(tag.br()) | filter.before(tag.label("Filter Components (none for all): ")) | filter.before(tag.br()) | filter.before(self._components_field_input(req))
    6. return stream
    7. def _components_field_input(self, req):
    8. cursor = self.env.get_db_cnx().cursor()
    9. cursor.execute("SELECT name FROM component ORDER BY name")
    Local variables: Name Value data {'abs_url_of': <function get_abs_url at 0xb780c1b4>, 'all': <function all ... filename 'timeline.html' filter <genshi.filters.transform.Transformer object at 0x9690434> method 'xhtml' req <Request "GET u'/timeline'"> self <TimelineComponentFilter.TimelineComponentFilterPlugin object at ... stream <genshi.core.Stream object at 0x914c80c>
  • File "/home/trac/Textkernel/plugins/TimelineComponentFilter.py", line 51, in _components_field_input Code fragment:
    1. return stream | filter.before(tag.br()) | filter.before(tag.label("Filter Components (none for all): ")) | filter.before(tag.br()) | filter.before(self._components_field_input(req))
    2. return stream
    3. def _components_field_input(self, req):
    4. cursor = self.env.get_db_cnx().cursor()
    5. cursor.execute("SELECT name FROM component ORDER BY name")
    6. select = tag.select(name="filter-components", id="filter-components", multiple="multiple", size="10")
    7. selectedcomps = []
    8. selectedcomps = req.args.get('filter-components', )
    9. for component in cursor:
    10. if component[0] in selectedcomps:
    Local variables: Name Value cursor <trac.db.util.IterableCursor object at 0xb793674c> req <Request "GET u'/timeline'"> self <TimelineComponentFilter.TimelineComponentFilterPlugin object at ...
  • File "/usr/lib/python2.4/site-packages/Trac-0.11.6-py2.4.egg/trac/db/util.py", line 65, in execute Code fragment:
    1. except Exception, e:
    2. self.log.debug('execute exception: %r', e)
    3. raise
    4. if args:
    5. return self.cursor.execute(sql_escape_percent(sql), args)
    6. return self.cursor.execute(sql)
    7. def executemany(self, sql, args=None):
    8. if self.log:
    9. self.log.debug('SQL: %r', sql)
    10. try:
    Local variables: Name Value args None self <trac.db.util.IterableCursor object at 0xb793674c> sql 'SELECT name FROM component ORDER BY name'
  • File "/usr/lib/python2.4/site-packages/sqlite/main.py", line 233, in execute

Change History (0)

Note: See TracTickets for help on using tickets.