Modify

Opened 17 years ago

Closed 8 years ago

#1037 closed defect (wontfix)

[PATCH] Assertion error after login

Reported by: anonymous Owned by:
Priority: normal Component: TracForgePlugin
Severity: blocker Keywords:
Cc: Trac Release: 0.10

Description

I don't know where else to go with this. I am trying to setup TracForge. I have set it up according to your instructions and immediately after I log in I get an assertion error.

I'm sorry, but I don't know anything about python.

I have tried this against trac 0.10.0 and 0.10.3 (my current version).

Here is the information from the error log:

2006-12-20 15:30:50,496 Trac[main] ERROR: Header values must be strings Traceback (most recent call last):

File "/usr/lib/python2.4/site-packages/trac/web/main.py", line 387, in dispatch_request

dispatcher.dispatch(req)

File "/usr/lib/python2.4/site-packages/trac/web/main.py", line 237, in dispatch

resp = chosen_handler.process_request(req)

File "build/bdist.linux-i686/egg/acct_mgr/web_ui.py", line 341, in process_request File "/usr/lib/python2.4/site-packages/trac/web/auth.py", line 103, in process_request

self._redirect_back(req)

File "build/bdist.linux-i686/egg/acct_mgr/web_ui.py", line 363, in _redirect_back File "/usr/lib/python2.4/site-packages/TracForge-1.0-py2.4.egg/tracforge/linker/auth.py", line 62, in my_redirect

Request.redirect(req, referer)

File "/usr/lib/python2.4/site-packages/trac/web/api.py", line 337, in redirect

self.end_headers()

File "/usr/lib/python2.4/site-packages/trac/web/api.py", line 279, in end_headers

self._write = self._start_response(self._status, self._outheaders)

File "/usr/lib/python2.4/site-packages/trac/web/_fcgi.py", line 1247, in start_response

assert type(val) is str, 'Header values must be strings'

AssertionError: Header values must be strings

Attachments (0)

Change History (6)

comment:1 Changed 17 years ago by mpalmer@…

I've got this problem too, on my first "client" (perhaps 'child' would be a better term?) project. Something that is missing from the original report is this line from the bottom of the traceback, which I presume is the local variables at the time of the exception:

builtin type = <type 'type'>, val = u'trac_auth=b13515a3b0711ca993fc12e6c9779689; Path=/;', builtin str = <type 'str'>

I'm no Python expert, but it looks like val is a unicode string (I think that's what u' means), and _fcgi.py:1247 is trying to assert that the string is a really, truly string. I'd imagine that the answer to this problem is to cast the cookie string back into a real string, but I'm not sure where that needs to be done exactly. The fact that the problem only presents itself with the TracForgePlugin suggests it's somewhere in the plugin, but I would have thought that the cookie generation would have been the responsibility of Trac itself. I'll comment again if I solve the problem with a patch.

Examining the code around the failing assertion, it only gets evaluated if __debug__ is set, so if we could turn off __debug__ that'd do the trick temporarily (although I don't know how to do that). An even dirtier hack is just to comment out those lines -- it works fine for me.

comment:3 Changed 17 years ago by mpalmer@…

Summary: Assertion error after login[PATCH] Assertion error after login

comment:4 Changed 16 years ago by Pedro Algarvio, aka, s0undt3ch

Does not appear to show up on 0.11 branch of TracForgePlugin.

comment:5 Changed 9 years ago by Ryan J Ollos

Owner: Noah Kantrowitz deleted

comment:6 Changed 8 years ago by Ryan J Ollos

Resolution: wontfix
Status: newclosed

Plugin is deprecated.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The ticket will remain with no owner.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


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

 
Note: See TracTickets for help on using tickets.