Exception "UnboundLocalError: local variable 'username' referenced before assignment" logged

Issue #486 closed
Arsène von Wyss created an issue

Because some things don't work as expected I looked into the output logged by RhodeCode, and find the following more or less frequently, apparently on pulls (judging from the log output, but that's a rough guess): {{{ Exception happened during processing of request from ('172.21.80.32', 4295) Traceback (most recent call last): File "C:\Python27\lib\site-packages\paste\httpserver.py", line 1068, in process_request_in_thread self.finish_request(request, client_address) File "C:\Python27\lib\SocketServer.py", line 323, in finish_request self.RequestHandlerClass(request, client_address, self) File "C:\Python27\lib\SocketServer.py", line 639, in init self.handle() File "C:\Python27\lib\site-packages\paste\httpserver.py", line 442, in handle BaseHTTPRequestHandler.handle(self) File "C:\Python27\lib\BaseHTTPServer.py", line 337, in handle self.handle_one_request() File "C:\Python27\lib\site-packages\paste\httpserver.py", line 437, in handle_one_request self.wsgi_execute() File "C:\Python27\lib\site-packages\paste\httpserver.py", line 287, in wsgi_execute self.wsgi_start_response) File "C:\Python27\lib\site-packages\paste\gzipper.py", line 35, in call return self.application(environ, start_response) File "C:\Python27\lib\site-packages\paste\cascade.py", line 130, in call return self.apps-1 File "C:\Python27\lib\site-packages\paste\registry.py", line 379, in call app_iter = self.application(environ, start_response) File "C:\Python27\lib\site-packages\rhodecode\lib\middleware\https_fixup.py", line 37, in call return self.application(environ, start_response) File "C:\Python27\lib\site-packages\pylons\middleware.py", line 150, in call self.app, environ, catch_exc_info=True) File "C:\Python27\lib\site-packages\pylons\util.py", line 48, in call_wsgi_application app_iter = application(environ, start_response) File "C:\Python27\lib\site-packages\rhodecode\lib\base.py", line 133, in call return self._handle_request(environ, start_response) File "C:\Python27\lib\site-packages\rhodecode\lib\middleware\simplegit.py", line 102, in _handle_request return self.application(environ, start_response) File "C:\Python27\lib\site-packages\rhodecode\lib\base.py", line 133, in call return self._handle_request(environ, start_response) File "C:\Python27\lib\site-packages\rhodecode\lib\middleware\simplehg.py", line 154, in _handle_request 'username': username, UnboundLocalError: local variable 'username' referenced before assignment }}}

Comments (8)

  1. Arsène von Wyss reporter

    Not really - however I do have some extensions which aren't part of the standard distribution (Kiln extensions). Other than that it's the plain TortoiseHG bundle.

  2. Marcin Kuzminski repo owner

    generally that is very bad if that occured rhodecode couldn't recognize action made (pull/push). Can you pinpoint the problem somehow ? extensions TortoiseHG ?

    It must be something altering QUERY_STRING in http.

  3. Arsène von Wyss reporter

    I'll try to pinpoint it, right now I don't have a clue what exactly happens. However, I can offer to send you the logfile; I'm not keen on posting it here because I'm not sure if there is any sensitive information in it. If you send me a message with your e-mail address I can zip and attach it, maybe you'd recognize a pattern or something.

  4. Marcin Kuzminski repo owner

    Can you disable extensions, and re-check this issue ? it must be something non-standard that's sending in via the http, and confusing rhodecode.

  5. Log in to comment