Modify

Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#13190 closed defect (fixed)

ImportError: cannot import name HTTPBasicAuthHandler

Reported by: ntmlod Owned by: Ryan J Ollos
Priority: normal Component: AccountManagerPlugin
Severity: normal Keywords:
Cc: Trac Release: 1.0

Description

I switched from release tag 0.4.4 to trunk 0.5dev for my verification email issue (#12735) to see if it has been fixed with the last commits.

After resolving several imports problems with my not-up-to-date Trac installation (1.0.1), I encountered a new problem

2017-05-24 21:08:31,958 Trac[loader] ERROR: Skipping "acct_mgr.http = acct_mgr.http":
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/trac/loader.py", line 68, in _load_eggs
    entry.load(require=True)
  File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 2260, in load
    entry = __import__(self.module_name, globals(),globals(), ['__name__'])
  File "build/bdist.linux-x86_64/egg/acct_mgr/http.py", line 20, in <module>
ImportError: cannot import name HTTPBasicAuthHandler
2017-05-24 21:08:32,578 Trac[db] ERROR: <class 'acct_mgr.web_ui.ResetPwStore'>: no IPasswordHashMethod enabled - fatal, can't work

Attachments (0)

Change History (13)

comment:1 Changed 8 years ago by Ryan J Ollos

In 16619:

0.5dev: Change imports to be compatible with Trac 1.0.1

Refs #13190.

comment:2 in reply to:  description ; Changed 8 years ago by Ryan J Ollos

Replying to ntmlod:

I switched from release tag 0.4.4 to trunk 0.5dev for my verification email issue (#12735) to see if it has been fixed with the last commits.

Please share your [account-manager] section.

After resolving several imports problems with my not-up-to-date Trac installation (1.0.1),

What changes did you need to make? Can you post a patch?

comment:3 Changed 8 years ago by Alexey

I has same error in trac.log with latest trunk (r16619) version of AccountManagerPlugin on Trac 1.2.1

2017-05-26 08:39:38,259 Trac[loader] ERROR: Skipping "acct_mgr.http = acct_mgr.http": ImportError: cannot import name HTTPBasicAuthHandler

my [account-manager] section:

[account-manager]
allow_delete_account = disabled
auth_init = disabled
cache_ttl = 90
cookie_refresh_pct = 10
db_htdigest_realm = 
dir_basedn = DC=bla-bla,DC=bla
dir_binddn = bla@bla_bla.bla
dir_bindpw = bla_bla_bla
dir_uri = ldap://bla_bla.bla
email_regexp = (?i)^[A-Z0-9._%+-]+@(?:[A-Z0-9-]+\.)+[A-Z]{2,6}$
force_passwd_change = disabled
generated_password_length = 8
group_basedn = 
group_expand = 0
group_knownusers = enabled
hash_method = HtDigestHashMethod
login_attempt_max_count = 0
login_opt_list = disabled
password_file = 
password_store = DirAuthStore
persistent_sessions = enabled
refresh_passwd = disabled
register_basic_question = 
register_basic_token = 
register_check = 
reset_password = disabled
user_lock_max_time = 86400
user_lock_time = 0
user_lock_time_progression = 1
username_regexp = (?i)^[A-Z0-9.\-_]{5,}$
verify_email = disabled

comment:4 in reply to:  2 ; Changed 8 years ago by ntmlod

Replying to Ryan J Ollos:

Replying to ntmlod:

I switched from release tag 0.4.4 to trunk 0.5dev for my verification email issue (#12735) to see if it has been fixed with the last commits.

Please share your [account-manager] section.

I solved this issue, see my last comment on #12735

After resolving several imports problems with my not-up-to-date Trac installation (1.0.1),

What changes did you need to make? Can you post a patch?

You have fixed almost all import issues with your last commit, it remains

  • acct_mgr/admin.py

     
    2828from trac.core import Component, ExtensionPoint, implements
    2929from trac.perm import PermissionCache, PermissionSystem
    3030from trac.util import as_int
     31from trac.util.compat import cleandoc
    3132from trac.util.datefmt import format_datetime, to_datetime
    3233from trac.util.html import html as tag
    3334from trac.util.presentation import Paginator
    34 from trac.util.text import cleandoc, exception_to_unicode
     35from trac.util.text import exception_to_unicode
    3536from trac.web.api import IAuthenticator
    3637from trac.web.chrome import Chrome, add_ctxtnav, add_link, add_notice
    3738from trac.web.chrome import add_script, add_stylesheet, add_warning
  • acct_mgr/api.py

     
    1616from trac.core import Component, ExtensionPoint, Interface, TracError
    1717from trac.core import implements
    1818from trac.perm import IPermissionRequestor, PermissionCache
    19 from trac.util.text import exception_to_unicode, cleandoc
     19from trac.util.compat import cleandoc
     20from trac.util.text import exception_to_unicode
    2021from trac.util.translation import dgettext, domain_functions
    2122from trac.web.chrome import ITemplateProvider, add_warning
    2223from trac.web.main import IRequestFilter

comment:5 in reply to:  4 ; Changed 8 years ago by Ryan J Ollos

Replying to ntmlod:

You have fixed almost all import issues with your last commit, it remains

You must be on Python 2.5 then. Is that correct?

comment:6 in reply to:  5 Changed 8 years ago by ntmlod

Replying to Ryan J Ollos:

Replying to ntmlod:

You have fixed almost all import issues with your last commit, it remains

You must be on Python 2.5 then. Is that correct?

Nop, Python 2.7.6

comment:7 Changed 8 years ago by Ryan J Ollos

In 16621:

0.5dev: Import cleandoc from compat module

Refs #13190.

comment:8 Changed 8 years ago by Ryan J Ollos

I see how that it was just a regression introduced in r16370.

comment:9 in reply to:  3 ; Changed 8 years ago by Ryan J Ollos

Replying to Alexey:

I has same error in trac.log with latest trunk (r16619) version of AccountManagerPlugin on Trac 1.2.1

Please try with r11621 and let us known if you still see the ImportError.

comment:10 Changed 8 years ago by Ryan J Ollos

Resolution: fixed
Status: newclosed

In 16631:

0.5dev: Fix regression in r16370

Fixes #13190.

comment:11 Changed 8 years ago by Ryan J Ollos

Should be fixed with r16631. Very obvious error, not sure how I missed it in testing.

comment:12 Changed 8 years ago by ntmlod

Confirmed, probably I could have done it if I had take the trouble.

comment:13 in reply to:  9 Changed 8 years ago by Alexey

Replying to Ryan J Ollos:

Replying to Alexey:

I has same error in trac.log with latest trunk (r16619) version of AccountManagerPlugin on Trac 1.2.1

Please try with r11621 and let us known if you still see the ImportError.

Log is clean. All fine.

Modify Ticket

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