Modify

Opened 8 years ago

Closed 8 years ago

#12835 closed defect (worksforme)

Typeerror not all arguments converted during string formatting

Reported by: dennis.liou@… Owned by: Nikolaos Papagrigoriou
Priority: highest Component: TracLdapAuthPlugin
Severity: blocker Keywords:
Cc: Trac Release:

Description (last modified by Ryan J Ollos)

I find that the error happened in a line bind_name = (self.bind_dn%user).encode('utf8') in ldapauth/store.py:26. Please tell me why, and how to solve it.

Attachments (0)

Change History (7)

comment:1 Changed 8 years ago by Ryan J Ollos

Description: modified (diff)

comment:2 Changed 8 years ago by Ryan J Ollos

What value have you configured in trac.ini for [ldap] bind_dn?

Which version of Trac are you running? If you are running 1.0 or later, you should install from the 1.0 branch rather than the 0.11 branch.

comment:3 Changed 8 years ago by anonymous

I running with trac 1.0.2. Is there bind_user same with bind_dn? Or the two setting should be set simultaneously.

comment:4 Changed 8 years ago by dennis

This is full error in trac.log: Traceback (most recent call last):

File "build/bdist.linux-x86_64/egg/trac/web/main.py", line 250, in dispatch

self._post_process_request(req)

File "build/bdist.linux-x86_64/egg/trac/web/main.py", line 348, in _post_process_request

f.post_process_request(req, *(None,)*extra_arg_count)

File "build/bdist.linux-x86_64/egg/acct_mgr/web_ui.py", line 123, in post_process_request

if req.authname and req.authname != 'anonymous':

File "build/bdist.linux-x86_64/egg/trac/web/api.py", line 353, in getattr

value = self.callbacks[name](self)

File "build/bdist.linux-x86_64/egg/trac/web/main.py", line 136, in authenticate

authname = authenticator.authenticate(req)

File "build/bdist.linux-x86_64/egg/acct_mgr/util.py", line 82, in wrap

return func(self, *args, kwds)

File "build/bdist.linux-x86_64/egg/acct_mgr/web_ui.py", line 338, in authenticate

user = self._remote_user(req)

File "build/bdist.linux-x86_64/egg/acct_mgr/web_ui.py", line 684, in _remote_user

if acctmgr.check_password(user, password) == True:

File "build/bdist.linux-x86_64/egg/acct_mgr/api.py", line 259, in check_password

valid = store.check_password(user, password)

File "build/bdist.linux-x86_64/egg/ldapauth/store.py", line 21, in check_password

bind_name = (self.bind_dn%user).encode('utf8')

TypeError: not all arguments converted during string formatting/ Trac[main] ERROR [2016-08-02 08:08:49,630]: Internal Server Error: Traceback (most recent call last):

File "build/bdist.linux-x86_64/egg/trac/web/main.py", line 512, in _dispatch_request

dispatcher.dispatch(req)

File "build/bdist.linux-x86_64/egg/trac/web/main.py", line 186, in dispatch

self._pre_process_request(req, chosen_handler)

File "build/bdist.linux-x86_64/egg/trac/web/main.py", line 333, in _pre_process_request

chosen_handler = filter_.pre_process_request(req, chosen_handler)

File "build/bdist.linux-x86_64/egg/acct_mgr/register.py", line 479, in pre_process_request

if not req.session.authenticated:

File "build/bdist.linux-x86_64/egg/trac/web/api.py", line 353, in getattr

value = self.callbacks[name](self)

File "build/bdist.linux-x86_64/egg/trac/web/main.py", line 275, in _get_session

return Session(self.env, req)

File "build/bdist.linux-x86_64/egg/trac/web/session.py", line 201, in init

if req.authname == 'anonymous':

File "build/bdist.linux-x86_64/egg/trac/web/api.py", line 353, in getattr

value = self.callbacks[name](self)

File "build/bdist.linux-x86_64/egg/trac/web/main.py", line 136, in authenticate

authname = authenticator.authenticate(req)

File "build/bdist.linux-x86_64/egg/acct_mgr/util.py", line 82, in wrap

return func(self, *args, kwds)

File "build/bdist.linux-x86_64/egg/acct_mgr/web_ui.py", line 338, in authenticate

user = self._remote_user(req)

File "build/bdist.linux-x86_64/egg/acct_mgr/web_ui.py", line 684, in _remote_user

if acctmgr.check_password(user, password) == True:

File "build/bdist.linux-x86_64/egg/acct_mgr/api.py", line 259, in check_password

valid = store.check_password(user, password)

File "build/bdist.linux-x86_64/egg/ldapauth/store.py", line 21, in check_password

bind_name = (self.bind_dn%user).encode('utf8')

TypeError: not all arguments converted during string formatting/

It is no use to resinstall plugin.

Version 0, edited 8 years ago by dennis (next)

comment:5 Changed 8 years ago by Dennis

The error disappear after I restart apache, thanks.

comment:6 Changed 8 years ago by Dennis

After I restart apache, the error disappear. Thanks for help.

comment:7 Changed 8 years ago by Ryan J Ollos

Resolution: worksforme
Status: newclosed

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Nikolaos Papagrigoriou.
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.