#7408 closed defect (invalid)
AttributeError: 'module' object has no attribute 'urlsafe_b64encode'
Reported by: | Owned by: | anonymous | |
---|---|---|---|
Priority: | lowest | Milestone: | |
Component: | admin/web | Version: | 0.11 |
Severity: | trivial | Keywords: | |
Cc: | Matthew Good | Branch: | |
Release Notes: | |||
API Changes: | |||
Internal Changes: |
Description
How to Reproduce
While doing a GET operation on /admin
, Trac issued an internal error.
This error is thrown on all pages if the TracAccountManager plugin is installed. Disabling the plugin resolves the issue.
Request parameters:
{'cat_id': None, 'panel_id': None, 'path_info': None}
User Agent was: Mozilla/5.0 (Macintosh; U; PPC Mac OS X 10_5_3; en-us) AppleWebKit/525.18 (KHTML, like Gecko) Version/3.1.1 Safari/525.20
System Information
Trac | 0.11
|
Python | 2.3.5 (#2, Oct 16 2006, 19:19:48) [GCC 3.3.5 (Debian 1:3.3.5-13)]
|
setuptools | 0.6c8
|
MySQL | server: "5.0.24a-standard-log", client: "5.0.16", thread-safe: 1
|
MySQLdb | 1.2.2
|
Genshi | 0.5
|
Pygments | 0.9
|
Subversion | 1.4.2 (r22196)
|
jQuery: | 1.2.3
|
Python Traceback
Traceback (most recent call last): File "/home/.omaha/padams/packages/lib/python2.3/site-packages/Trac-0.11-py2.3.egg/trac/web/main.py", line 423, in _dispatch_request dispatcher.dispatch(req) File "/home/.omaha/padams/packages/lib/python2.3/site-packages/Trac-0.11-py2.3.egg/trac/web/main.py", line 208, in dispatch template, data, content_type = \ File "/home/.omaha/padams/packages/lib/python2.3/site-packages/Trac-0.11-py2.3.egg/trac/web/main.py", line 299, in _post_process_request resp = f.post_process_request(req, *resp) File "build/bdist.linux-i686/egg/acct_mgr/web_ui.py", line 537, in post_process_request File "build/bdist.linux-i686/egg/acct_mgr/web_ui.py", line 574, in _gen_token AttributeError: 'module' object has no attribute 'urlsafe_b64encode'
Attachments (0)
Change History (10)
comment:1 by , 16 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:2 by , 16 years ago
Resolution: | fixed |
---|---|
Status: | closed → reopened |
comment:3 by , 16 years ago
Keywords: | needinfo added |
---|
comment:4 by , 16 years ago
Owner: | set to |
---|---|
Status: | reopened → new |
comment:5 by , 16 years ago
Keywords: | needinfo removed |
---|---|
Resolution: | → invalid |
Status: | new → closed |
Error is coming from the accountmanager plugin, not Trac. Please file a ticket on trac-hacks for this.
comment:6 by , 16 years ago
Cc: | added |
---|
Just because I looked in to the issue anyway, the function in question wasn't added until Python 2.4. From the documentation of the base64 module I don't see a workaround, so this functionality (email verification) will not be available to 2.3 users.
comment:7 by , 16 years ago
Priority: | highest → high |
---|
I tried to resolve this by adding the doing this:
ln -s /usr/bin/python2.3 $HOME/bin/python export PATH="$HOME/bin:$PATH"
After doing this my trac installer script correctly tries to get packages for 2.4 and install trac and I get it running. Yet I can't change or add emails to user and the error still occurs. The output from trac is still showing Python version is 2.3. It is possible that somewhere in trac source the shebang is hardcoded to use /usr/bin/python instead of /bin/python? If so where do I change this? Thanks.
comment:8 by , 16 years ago
Resolution: | invalid |
---|---|
Status: | closed → reopened |
Confirmed ravi's report, with trac 11.2.1. Installed fine using local (pathed) python 2.4.4, but reverts to python 2.3.5 (I assume /usr/bin) in shared hosting environment.
User Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.0.5) Gecko/2008121623 Ubuntu/8.10 (intrepid) Firefox/3.0.5 Trac: 0.11.2.1 Python: 2.3.5 (#2, Oct 16 2006, 19:19:48) [GCC 3.3.5 (Debian 1:3.3.5-13)] setuptools: 0.6c9 SQLite: 3.2.1 pysqlite: 2.0.5 Genshi: 0.5.1 Pygments: 1.0 Subversion: 1.4.2 (r22196) jQuery: 1.2.6
comment:9 by , 16 years ago
Priority: | high → lowest |
---|---|
Resolution: | → invalid |
Severity: | blocker → trivial |
Status: | reopened → closed |
To repeat, the accountmanager plugin isn't compatible with 2.3. This is not an issue with Trac, but with the plugin.
comment:10 by , 16 years ago
This can be avoided by adding the following to the [components]
section of your trac.ini
acct_mgr.web_ui.emailverificationmodule = disabled acct_mgr.web_ui.registrationmodule = disabled
Why was this resolved as fixed?