Mailing List Archive

Problem with Trac1.5.4 and latest TracDirectoryAuth & TracAccountManager combination
Hello,

I'm trying to upgrade to Trac1.5.4, which allows to use a current version
of python. I've already migrated the PageAuthzPolicyEditor plugin, but I'm
stuck with the TracDirectoryAuth plugin, which implements the
IPasswordStore interface from TracAccountManager.

TracAccountManager works fine with htpasswd, but if I enable the
TracDirectoryAuth plugin, trac shows an internal error: "TemplateNotFound:
account_login.html". This seems to happen in acct_mgr/web_ui.py, after
calling "return 'account_login.html'" (but it's not part of the stack
trace).
I think that the error message is misleading because the template
"account_login.html" exists and can be used in other situations. But it's
the only error message, that is shown in the log. Do you have any idea what
may have caused this error or how to search for it?
I'm using the trunk version of both plugins, but I had to modify
TracDirectoryAuth because of the python/trac API changes.

I 'm grateful for any help,
Anke

> 2023-05-17 17:01:07,168 Trac[main] ERROR: [172.17.0.1] Internal Server
Error: <RequestWithSession "GET '/login'">, referrer
'https://tractest.zam.kfa-juelich.de/visser1/prefs
<https://tractest.zam.kfa-juelich.de/visser1/prefs>'
> Traceback (most recent call last):
> File "/usr/local/lib/python3.9/dist-packages/trac/web/main.py", line
610, in dispatch_request
> dispatcher.dispatch(req)
> File "/usr/local/lib/python3.9/dist-packages/trac/web/main.py", line
302, in dispatch
> raise e
> File "/usr/local/lib/python3.9/dist-packages/trac/web/main.py", line
266, in dispatch
> output = chrome.render_template(req, template, data, metadata)
> File "/usr/local/lib/python3.9/dist-packages/trac/web/chrome.py", line
1377, in render_template
> template, data = self.prepare_template(req, filename, data, text,
> File "/usr/local/lib/python3.9/dist-packages/trac/web/chrome.py", line
1480, in prepare_template
> template = self.load_template(filename, text)
> File "/usr/local/lib/python3.9/dist-packages/trac/web/chrome.py", line
1323, in load_template
> return (self.jenv_text if text else self.jenv).get_template(filename)
> File "/usr/local/lib/python3.9/dist-packages/jinja2/environment.py",
line 1010, in get_template
> return self._load_template(name, globals)
> File "/usr/local/lib/python3.9/dist-packages/jinja2/environment.py",
line 969, in _load_template
> template = self.loader.load(self, name, self.make_globals(globals))
> File "/usr/local/lib/python3.9/dist-packages/jinja2/loaders.py", line
126, in load
> source, filename, uptodate = self.get_source(environment, name)
> File "/usr/local/lib/python3.9/dist-packages/jinja2/loaders.py", line
218, in get_source
> raise TemplateNotFound(template)
> TemplateNotFound: account_login.html
> 2023-05-17 17:01:07,168 Trac[authz_policy] DEBUG: Parsing authz security
policy /trac/projects/visser1/visser1.tracauthz.conf
> 2023-05-17 17:01:07,169 Trac[api] DEBUG: action controllers for ticket
workflow: ['ConfigurableTicketWorkflow']
> 2023-05-17 17:01:07,169 Trac[authz_policy] DEBUG: Checking TRAC_ADMIN on
*:*@*
> 2023-05-17 17:01:07,169 Trac[auth] DEBUG: _dir_search: searching
ou=users,cn=trac,

--
You received this message because you are subscribed to the Google Groups "Trac Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to trac-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/trac-users/703f69ee-fe6f-4c3c-8a0c-d3548eaf4fe0n%40googlegroups.com.
Re: Problem with Trac1.5.4 and latest TracDirectoryAuth & TracAccountManager combination [ In reply to ]
Hi Anke,

Am Fr., 19. Mai 2023 um 09:50 Uhr schrieb Anke Visser <
anke.visser72@gmail.com>:

> Hello,
>
> I'm trying to upgrade to Trac1.5.4, which allows to use a current version
> of python. I've already migrated the PageAuthzPolicyEditor plugin, but I'm
> stuck with the TracDirectoryAuth plugin, which implements the
> IPasswordStore interface from TracAccountManager.
>
> TracAccountManager works fine with htpasswd, but if I enable the
> TracDirectoryAuth plugin, trac shows an internal error: "TemplateNotFound:
> account_login.html". This seems to happen in acct_mgr/web_ui.py, after
> calling "return 'account_login.html'" (but it's not part of the stack
> trace).
> I think that the error message is misleading because the template
> "account_login.html" exists and can be used in other situations. But it's
> the only error message, that is shown in the log. Do you have any idea what
> may have caused this error or how to search for it?
> I'm using the trunk version of both plugins, but I had to modify
> TracDirectoryAuth because of the python/trac API changes.
>
>
if i remember right i couldnt get the trunk version of AccountManager to
work properly with 1.5.4 so i tried the fork of Niels Sascha Reedijk on
github https://github.com/nielx/trac-accountmanager-fork
you might try this version with the other plugin and see if you get a
diffrent error then the one for the account_login.html



> I 'm grateful for any help,
> Anke
>
> > 2023-05-17 17:01:07,168 Trac[main] ERROR: [172.17.0.1] Internal Server
> Error: <RequestWithSession "GET '/login'">, referrer '
> https://tractest.zam.kfa-juelich.de/visser1/prefs <
> https://tractest.zam.kfa-juelich.de/visser1/prefs>'
> > Traceback (most recent call last):
> > File "/usr/local/lib/python3.9/dist-packages/trac/web/main.py", line
> 610, in dispatch_request
> > dispatcher.dispatch(req)
> > File "/usr/local/lib/python3.9/dist-packages/trac/web/main.py", line
> 302, in dispatch
> > raise e
> > File "/usr/local/lib/python3.9/dist-packages/trac/web/main.py", line
> 266, in dispatch
> > output = chrome.render_template(req, template, data, metadata)
> > File "/usr/local/lib/python3.9/dist-packages/trac/web/chrome.py",
> line 1377, in render_template
> > template, data = self.prepare_template(req, filename, data, text,
> > File "/usr/local/lib/python3.9/dist-packages/trac/web/chrome.py",
> line 1480, in prepare_template
> > template = self.load_template(filename, text)
> > File "/usr/local/lib/python3.9/dist-packages/trac/web/chrome.py",
> line 1323, in load_template
> > return (self.jenv_text if text else
> self.jenv).get_template(filename)
> > File "/usr/local/lib/python3.9/dist-packages/jinja2/environment.py",
> line 1010, in get_template
> > return self._load_template(name, globals)
> > File "/usr/local/lib/python3.9/dist-packages/jinja2/environment.py",
> line 969, in _load_template
> > template = self.loader.load(self, name, self.make_globals(globals))
> > File "/usr/local/lib/python3.9/dist-packages/jinja2/loaders.py", line
> 126, in load
> > source, filename, uptodate = self.get_source(environment, name)
> > File "/usr/local/lib/python3.9/dist-packages/jinja2/loaders.py", line
> 218, in get_source
> > raise TemplateNotFound(template)
> > TemplateNotFound: account_login.html
> > 2023-05-17 17:01:07,168 Trac[authz_policy] DEBUG: Parsing authz security
> policy /trac/projects/visser1/visser1.tracauthz.conf
> > 2023-05-17 17:01:07,169 Trac[api] DEBUG: action controllers for ticket
> workflow: ['ConfigurableTicketWorkflow']
> > 2023-05-17 17:01:07,169 Trac[authz_policy] DEBUG: Checking TRAC_ADMIN on
> *:*@*
> > 2023-05-17 17:01:07,169 Trac[auth] DEBUG: _dir_search: searching
> ou=users,cn=trac,
>
> --
> You received this message because you are subscribed to the Google Groups
> "Trac Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to trac-users+unsubscribe@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/trac-users/703f69ee-fe6f-4c3c-8a0c-d3548eaf4fe0n%40googlegroups.com
> <https://groups.google.com/d/msgid/trac-users/703f69ee-fe6f-4c3c-8a0c-d3548eaf4fe0n%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

--
You received this message because you are subscribed to the Google Groups "Trac Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to trac-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/trac-users/CAJ4osO%3D%2BJeMtV3zPv-tZ5MZXv9hoRFLxNO6-i9LiEhZVARC_ag%40mail.gmail.com.
Re: Problem with Trac1.5.4 and latest TracDirectoryAuth & TracAccountManager combination [ In reply to ]
On Fri, May 19, 2023 at 4:50?PM Anke Visser <anke.visser72@gmail.com> wrote:
> TracAccountManager works fine with htpasswd, but if I enable the TracDirectoryAuth plugin, trac shows an internal error: "TemplateNotFound: account_login.html". This seems to happen in acct_mgr/web_ui.py, after calling "return 'account_login.html'" (but it's not part of the stack trace).
> I think that the error message is misleading because the template "account_login.html" exists and can be used in other situations. But it's the only error message, that is shown in the log. Do you have any idea what may have caused this error or how to search for it?
> I'm using the trunk version of both plugins, but I had to modify TracDirectoryAuth because of the python/trac API changes.

It seems that your installation of TracAccountManager is broken.
Check account_login.html file is correctly installed.

$ pip show -f TracAccountManager | grep -F account_login.html
acct_mgr/templates/genshi/account_login.html
acct_mgr/templates/jinja2/account_login.html

--
Jun Omae <jun66j5@gmail.com> (?? ?)

--
You received this message because you are subscribed to the Google Groups "Trac Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to trac-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/trac-users/CAEVLMaibuL5TzgrRnaN2BPQ1ucy23gMJ3QBwntgg%3D-qRiqyi0g%40mail.gmail.com.
Re: Problem with Trac1.5.4 and latest TracDirectoryAuth & TracAccountManager combination [ In reply to ]
On Fri, May 19, 2023 at 4:50?PM Anke Visser <anke.visser72@gmail.com> wrote:
> I'm trying to upgrade to Trac1.5.4, which allows to use a current version of python. I've already migrated the PageAuthzPolicyEditor plugin, but I'm stuck with the TracDirectoryAuth plugin, which implements the IPasswordStore interface from TracAccountManager.

I think that is due to your modified TracDirectoryAuth. Please share
your TracDirectoryAuth. No one can help it without sharing the source.

--
Jun Omae <jun66j5@gmail.com> (?? ?)

--
You received this message because you are subscribed to the Google Groups "Trac Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to trac-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/trac-users/CAEVLMahOXzoRv2HZhEkwiUte72tWp_KDMqTJ9y--bBXgXCbXCQ%40mail.gmail.com.
Re: Problem with Trac1.5.4 and latest TracDirectoryAuth & TracAccountManager combination [ In reply to ]
Thank you, I've attached the changes. My python knowledge is very limited,
so I probably have made a mistake.
Maybe a better error message or knowing the main cause of the error message
would help me. The file "account_login.html" isn't missing and can be used
by other parts of the plugin.

On Friday, May 19, 2023 at 1:36:51?PM UTC+2 Jun Omae wrote:

> On Fri, May 19, 2023 at 4:50?PM Anke Visser <anke.v...@gmail.com> wrote:
> > I'm trying to upgrade to Trac1.5.4, which allows to use a current
> version of python. I've already migrated the PageAuthzPolicyEditor plugin,
> but I'm stuck with the TracDirectoryAuth plugin, which implements the
> IPasswordStore interface from TracAccountManager.
>
> I think that is due to your modified TracDirectoryAuth. Please share
> your TracDirectoryAuth. No one can help it without sharing the source.
>
> --
> Jun Omae <jun...@gmail.com> (?? ?)
>

--
You received this message because you are subscribed to the Google Groups "Trac Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to trac-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/trac-users/3c969d00-0390-4c95-a89c-64bc6411e5b4n%40googlegroups.com.
Re: Problem with Trac1.5.4 and latest TracDirectoryAuth & TracAccountManager combination [ In reply to ]
Thank you. I'll try that version and I'll report.

Greetings,
Anke

On Friday, May 19, 2023 at 10:37:45?AM UTC+2 Markus Rosjat wrote:

> Hi Anke,
>
> Am Fr., 19. Mai 2023 um 09:50 Uhr schrieb Anke Visser <anke.v...@gmail.com
> >:
>
>> Hello,
>>
>> I'm trying to upgrade to Trac1.5.4, which allows to use a current version
>> of python. I've already migrated the PageAuthzPolicyEditor plugin, but I'm
>> stuck with the TracDirectoryAuth plugin, which implements the
>> IPasswordStore interface from TracAccountManager.
>>
>> TracAccountManager works fine with htpasswd, but if I enable the
>> TracDirectoryAuth plugin, trac shows an internal error: "TemplateNotFound:
>> account_login.html". This seems to happen in acct_mgr/web_ui.py, after
>> calling "return 'account_login.html'" (but it's not part of the stack
>> trace).
>> I think that the error message is misleading because the template
>> "account_login.html" exists and can be used in other situations. But it's
>> the only error message, that is shown in the log. Do you have any idea what
>> may have caused this error or how to search for it?
>> I'm using the trunk version of both plugins, but I had to modify
>> TracDirectoryAuth because of the python/trac API changes.
>>
>>
> if i remember right i couldnt get the trunk version of AccountManager to
> work properly with 1.5.4 so i tried the fork of Niels Sascha Reedijk on
> github https://github.com/nielx/trac-accountmanager-fork
> you might try this version with the other plugin and see if you get a
> diffrent error then the one for the account_login.html
>
>
>
>> I 'm grateful for any help,
>> Anke
>>
>> > 2023-05-17 17:01:07,168 Trac[main] ERROR: [172.17.0.1] Internal Server
>> Error: <RequestWithSession "GET '/login'">, referrer '
>> https://tractest.zam.kfa-juelich.de/visser1/prefs <
>> https://tractest.zam.kfa-juelich.de/visser1/prefs>'
>> > Traceback (most recent call last):
>> > File "/usr/local/lib/python3.9/dist-packages/trac/web/main.py", line
>> 610, in dispatch_request
>> > dispatcher.dispatch(req)
>> > File "/usr/local/lib/python3.9/dist-packages/trac/web/main.py", line
>> 302, in dispatch
>> > raise e
>> > File "/usr/local/lib/python3.9/dist-packages/trac/web/main.py", line
>> 266, in dispatch
>> > output = chrome.render_template(req, template, data, metadata)
>> > File "/usr/local/lib/python3.9/dist-packages/trac/web/chrome.py",
>> line 1377, in render_template
>> > template, data = self.prepare_template(req, filename, data, text,
>> > File "/usr/local/lib/python3.9/dist-packages/trac/web/chrome.py",
>> line 1480, in prepare_template
>> > template = self.load_template(filename, text)
>> > File "/usr/local/lib/python3.9/dist-packages/trac/web/chrome.py",
>> line 1323, in load_template
>> > return (self.jenv_text if text else
>> self.jenv).get_template(filename)
>> > File "/usr/local/lib/python3.9/dist-packages/jinja2/environment.py",
>> line 1010, in get_template
>> > return self._load_template(name, globals)
>> > File "/usr/local/lib/python3.9/dist-packages/jinja2/environment.py",
>> line 969, in _load_template
>> > template = self.loader.load(self, name, self.make_globals(globals))
>> > File "/usr/local/lib/python3.9/dist-packages/jinja2/loaders.py",
>> line 126, in load
>> > source, filename, uptodate = self.get_source(environment, name)
>> > File "/usr/local/lib/python3.9/dist-packages/jinja2/loaders.py",
>> line 218, in get_source
>> > raise TemplateNotFound(template)
>> > TemplateNotFound: account_login.html
>> > 2023-05-17 17:01:07,168 Trac[authz_policy] DEBUG: Parsing authz
>> security policy /trac/projects/visser1/visser1.tracauthz.conf
>> > 2023-05-17 17:01:07,169 Trac[api] DEBUG: action controllers for ticket
>> workflow: ['ConfigurableTicketWorkflow']
>> > 2023-05-17 17:01:07,169 Trac[authz_policy] DEBUG: Checking TRAC_ADMIN
>> on *:*@*
>> > 2023-05-17 17:01:07,169 Trac[auth] DEBUG: _dir_search: searching
>> ou=users,cn=trac,
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Trac Users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to trac-users+...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/trac-users/703f69ee-fe6f-4c3c-8a0c-d3548eaf4fe0n%40googlegroups.com
>> <https://groups.google.com/d/msgid/trac-users/703f69ee-fe6f-4c3c-8a0c-d3548eaf4fe0n%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
>

--
You received this message because you are subscribed to the Google Groups "Trac Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to trac-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/trac-users/409e213a-0c19-4a59-adac-a76c78b993dcn%40googlegroups.com.
Re: Problem with Trac1.5.4 and latest TracDirectoryAuth & TracAccountManager combination [ In reply to ]
Got it!!! Woohoo!!! With the version
https://github.com/nielx/trac-accountmanager-fork I got the trace of an old
python 2.7 call. Now I can login using LDAP. Thank you very much for your
help. I almost gave up.

Regards,
Anke

On Friday, May 19, 2023 at 6:35:17?PM UTC+2 Anke Visser wrote:

> Thank you. I'll try that version and I'll report.
>
> Greetings,
> Anke
>
> On Friday, May 19, 2023 at 10:37:45?AM UTC+2 Markus Rosjat wrote:
>
>> Hi Anke,
>>
>> Am Fr., 19. Mai 2023 um 09:50 Uhr schrieb Anke Visser <
>> anke.v...@gmail.com>:
>>
>>> Hello,
>>>
>>> I'm trying to upgrade to Trac1.5.4, which allows to use a current
>>> version of python. I've already migrated the PageAuthzPolicyEditor plugin,
>>> but I'm stuck with the TracDirectoryAuth plugin, which implements the
>>> IPasswordStore interface from TracAccountManager.
>>>
>>> TracAccountManager works fine with htpasswd, but if I enable the
>>> TracDirectoryAuth plugin, trac shows an internal error: "TemplateNotFound:
>>> account_login.html". This seems to happen in acct_mgr/web_ui.py, after
>>> calling "return 'account_login.html'" (but it's not part of the stack
>>> trace).
>>> I think that the error message is misleading because the template
>>> "account_login.html" exists and can be used in other situations. But it's
>>> the only error message, that is shown in the log. Do you have any idea what
>>> may have caused this error or how to search for it?
>>> I'm using the trunk version of both plugins, but I had to modify
>>> TracDirectoryAuth because of the python/trac API changes.
>>>
>>>
>> if i remember right i couldnt get the trunk version of AccountManager to
>> work properly with 1.5.4 so i tried the fork of Niels Sascha Reedijk on
>> github https://github.com/nielx/trac-accountmanager-fork
>> you might try this version with the other plugin and see if you get a
>> diffrent error then the one for the account_login.html
>>
>>
>>
>>> I 'm grateful for any help,
>>> Anke
>>>
>>> > 2023-05-17 17:01:07,168 Trac[main] ERROR: [172.17.0.1] Internal Server
>>> Error: <RequestWithSession "GET '/login'">, referrer '
>>> https://tractest.zam.kfa-juelich.de/visser1/prefs <
>>> https://tractest.zam.kfa-juelich.de/visser1/prefs>'
>>> > Traceback (most recent call last):
>>> > File "/usr/local/lib/python3.9/dist-packages/trac/web/main.py",
>>> line 610, in dispatch_request
>>> > dispatcher.dispatch(req)
>>> > File "/usr/local/lib/python3.9/dist-packages/trac/web/main.py",
>>> line 302, in dispatch
>>> > raise e
>>> > File "/usr/local/lib/python3.9/dist-packages/trac/web/main.py",
>>> line 266, in dispatch
>>> > output = chrome.render_template(req, template, data, metadata)
>>> > File "/usr/local/lib/python3.9/dist-packages/trac/web/chrome.py",
>>> line 1377, in render_template
>>> > template, data = self.prepare_template(req, filename, data, text,
>>> > File "/usr/local/lib/python3.9/dist-packages/trac/web/chrome.py",
>>> line 1480, in prepare_template
>>> > template = self.load_template(filename, text)
>>> > File "/usr/local/lib/python3.9/dist-packages/trac/web/chrome.py",
>>> line 1323, in load_template
>>> > return (self.jenv_text if text else
>>> self.jenv).get_template(filename)
>>> > File
>>> "/usr/local/lib/python3.9/dist-packages/jinja2/environment.py", line 1010,
>>> in get_template
>>> > return self._load_template(name, globals)
>>> > File
>>> "/usr/local/lib/python3.9/dist-packages/jinja2/environment.py", line 969,
>>> in _load_template
>>> > template = self.loader.load(self, name,
>>> self.make_globals(globals))
>>> > File "/usr/local/lib/python3.9/dist-packages/jinja2/loaders.py",
>>> line 126, in load
>>> > source, filename, uptodate = self.get_source(environment, name)
>>> > File "/usr/local/lib/python3.9/dist-packages/jinja2/loaders.py",
>>> line 218, in get_source
>>> > raise TemplateNotFound(template)
>>> > TemplateNotFound: account_login.html
>>> > 2023-05-17 17:01:07,168 Trac[authz_policy] DEBUG: Parsing authz
>>> security policy /trac/projects/visser1/visser1.tracauthz.conf
>>> > 2023-05-17 17:01:07,169 Trac[api] DEBUG: action controllers for ticket
>>> workflow: ['ConfigurableTicketWorkflow']
>>> > 2023-05-17 17:01:07,169 Trac[authz_policy] DEBUG: Checking TRAC_ADMIN
>>> on *:*@*
>>> > 2023-05-17 17:01:07,169 Trac[auth] DEBUG: _dir_search: searching
>>> ou=users,cn=trac,
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "Trac Users" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to trac-users+...@googlegroups.com.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/trac-users/703f69ee-fe6f-4c3c-8a0c-d3548eaf4fe0n%40googlegroups.com
>>> <https://groups.google.com/d/msgid/trac-users/703f69ee-fe6f-4c3c-8a0c-d3548eaf4fe0n%40googlegroups.com?utm_medium=email&utm_source=footer>
>>> .
>>>
>>

--
You received this message because you are subscribed to the Google Groups "Trac Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to trac-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/trac-users/ebcbab06-b18d-4417-85ad-ca664c81b336n%40googlegroups.com.
Re: Problem with Trac1.5.4 and latest TracDirectoryAuth & TracAccountManager combination [ In reply to ]
Glad it worked out!

Anke Visser <anke.visser72@gmail.com> schrieb am Fr., 19. Mai 2023, 19:28:

> Got it!!! Woohoo!!! With the version
> https://github.com/nielx/trac-accountmanager-fork I got the trace of an
> old python 2.7 call. Now I can login using LDAP. Thank you very much for
> your help. I almost gave up.
>
> Regards,
> Anke
>
> On Friday, May 19, 2023 at 6:35:17?PM UTC+2 Anke Visser wrote:
>
>> Thank you. I'll try that version and I'll report.
>>
>> Greetings,
>> Anke
>>
>> On Friday, May 19, 2023 at 10:37:45?AM UTC+2 Markus Rosjat wrote:
>>
>>> Hi Anke,
>>>
>>> Am Fr., 19. Mai 2023 um 09:50 Uhr schrieb Anke Visser <
>>> anke.v...@gmail.com>:
>>>
>>>> Hello,
>>>>
>>>> I'm trying to upgrade to Trac1.5.4, which allows to use a current
>>>> version of python. I've already migrated the PageAuthzPolicyEditor plugin,
>>>> but I'm stuck with the TracDirectoryAuth plugin, which implements the
>>>> IPasswordStore interface from TracAccountManager.
>>>>
>>>> TracAccountManager works fine with htpasswd, but if I enable the
>>>> TracDirectoryAuth plugin, trac shows an internal error: "TemplateNotFound:
>>>> account_login.html". This seems to happen in acct_mgr/web_ui.py, after
>>>> calling "return 'account_login.html'" (but it's not part of the stack
>>>> trace).
>>>> I think that the error message is misleading because the template
>>>> "account_login.html" exists and can be used in other situations. But it's
>>>> the only error message, that is shown in the log. Do you have any idea what
>>>> may have caused this error or how to search for it?
>>>> I'm using the trunk version of both plugins, but I had to modify
>>>> TracDirectoryAuth because of the python/trac API changes.
>>>>
>>>>
>>> if i remember right i couldnt get the trunk version of AccountManager to
>>> work properly with 1.5.4 so i tried the fork of Niels Sascha Reedijk on
>>> github https://github.com/nielx/trac-accountmanager-fork
>>> you might try this version with the other plugin and see if you get a
>>> diffrent error then the one for the account_login.html
>>>
>>>
>>>
>>>> I 'm grateful for any help,
>>>> Anke
>>>>
>>>> > 2023-05-17 17:01:07,168 Trac[main] ERROR: [172.17.0.1] Internal
>>>> Server Error: <RequestWithSession "GET '/login'">, referrer '
>>>> https://tractest.zam.kfa-juelich.de/visser1/prefs <
>>>> https://tractest.zam.kfa-juelich.de/visser1/prefs>'
>>>> > Traceback (most recent call last):
>>>> > File "/usr/local/lib/python3.9/dist-packages/trac/web/main.py",
>>>> line 610, in dispatch_request
>>>> > dispatcher.dispatch(req)
>>>> > File "/usr/local/lib/python3.9/dist-packages/trac/web/main.py",
>>>> line 302, in dispatch
>>>> > raise e
>>>> > File "/usr/local/lib/python3.9/dist-packages/trac/web/main.py",
>>>> line 266, in dispatch
>>>> > output = chrome.render_template(req, template, data, metadata)
>>>> > File "/usr/local/lib/python3.9/dist-packages/trac/web/chrome.py",
>>>> line 1377, in render_template
>>>> > template, data = self.prepare_template(req, filename, data, text,
>>>> > File "/usr/local/lib/python3.9/dist-packages/trac/web/chrome.py",
>>>> line 1480, in prepare_template
>>>> > template = self.load_template(filename, text)
>>>> > File "/usr/local/lib/python3.9/dist-packages/trac/web/chrome.py",
>>>> line 1323, in load_template
>>>> > return (self.jenv_text if text else
>>>> self.jenv).get_template(filename)
>>>> > File
>>>> "/usr/local/lib/python3.9/dist-packages/jinja2/environment.py", line 1010,
>>>> in get_template
>>>> > return self._load_template(name, globals)
>>>> > File
>>>> "/usr/local/lib/python3.9/dist-packages/jinja2/environment.py", line 969,
>>>> in _load_template
>>>> > template = self.loader.load(self, name,
>>>> self.make_globals(globals))
>>>> > File "/usr/local/lib/python3.9/dist-packages/jinja2/loaders.py",
>>>> line 126, in load
>>>> > source, filename, uptodate = self.get_source(environment, name)
>>>> > File "/usr/local/lib/python3.9/dist-packages/jinja2/loaders.py",
>>>> line 218, in get_source
>>>> > raise TemplateNotFound(template)
>>>> > TemplateNotFound: account_login.html
>>>> > 2023-05-17 17:01:07,168 Trac[authz_policy] DEBUG: Parsing authz
>>>> security policy /trac/projects/visser1/visser1.tracauthz.conf
>>>> > 2023-05-17 17:01:07,169 Trac[api] DEBUG: action controllers for
>>>> ticket workflow: ['ConfigurableTicketWorkflow']
>>>> > 2023-05-17 17:01:07,169 Trac[authz_policy] DEBUG: Checking TRAC_ADMIN
>>>> on *:*@*
>>>> > 2023-05-17 17:01:07,169 Trac[auth] DEBUG: _dir_search: searching
>>>> ou=users,cn=trac,
>>>>
>>>> --
>>>> You received this message because you are subscribed to the Google
>>>> Groups "Trac Users" group.
>>>> To unsubscribe from this group and stop receiving emails from it, send
>>>> an email to trac-users+...@googlegroups.com.
>>>> To view this discussion on the web visit
>>>> https://groups.google.com/d/msgid/trac-users/703f69ee-fe6f-4c3c-8a0c-d3548eaf4fe0n%40googlegroups.com
>>>> <https://groups.google.com/d/msgid/trac-users/703f69ee-fe6f-4c3c-8a0c-d3548eaf4fe0n%40googlegroups.com?utm_medium=email&utm_source=footer>
>>>> .
>>>>
>>> --
> You received this message because you are subscribed to the Google Groups
> "Trac Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to trac-users+unsubscribe@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/trac-users/ebcbab06-b18d-4417-85ad-ca664c81b336n%40googlegroups.com
> <https://groups.google.com/d/msgid/trac-users/ebcbab06-b18d-4417-85ad-ca664c81b336n%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

--
You received this message because you are subscribed to the Google Groups "Trac Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to trac-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/trac-users/CAJ4osOkgaQ1i1PCP7m8Zg_mxOfV-iDVR66CQqU3QxU1N8xnQqQ%40mail.gmail.com.
Re: Problem with Trac1.5.4 and latest TracDirectoryAuth & TracAccountManager combination [ In reply to ]
On Sat, May 20, 2023 at 2:28?AM Anke Visser <anke.visser72@gmail.com> wrote:
>
> Got it!!! Woohoo!!! With the version https://github.com/nielx/trac-accountmanager-fork I got the trace of an old python 2.7 call. Now I can login using LDAP. Thank you very much for your help. I almost gave up.
>
> Regards,
> Anke

The fork is incomplete for Trac 1.5.4 and has some mistakes/bugs, so
I'd recommend using trunk.

--
Jun Omae <jun66j5@gmail.com> (?? ?)

--
You received this message because you are subscribed to the Google Groups "Trac Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to trac-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/trac-users/CAEVLMahDHH-5Ejpubg_x3eSM%2BmS3q0pMNJyJgjJuiwtsJ6kdWQ%40mail.gmail.com.
Re: Problem with Trac1.5.4 and latest TracDirectoryAuth & TracAccountManager combination [ In reply to ]
Hey Jun,

Am Fr., 19. Mai 2023 um 22:13 Uhr schrieb Jun Omae <jun66j5@gmail.com>:

> On Sat, May 20, 2023 at 2:28?AM Anke Visser <anke.visser72@gmail.com>
> wrote:
> >
> > Got it!!! Woohoo!!! With the version
> https://github.com/nielx/trac-accountmanager-fork I got the trace of an
> old python 2.7 call. Now I can login using LDAP. Thank you very much for
> your help. I almost gave up.
> >
> > Regards,
> > Anke
>
> The fork is incomplete for Trac 1.5.4 and has some mistakes/bugs, so
> I'd recommend using trunk.
>
>
yeah the code i used when i tested wasnt the same as it is now in trunk so
the fork worked for me. I will check out the trunk version to since it
seems more recent now.

Cheers

MArkus

--
You received this message because you are subscribed to the Google Groups "Trac Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to trac-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/trac-users/CAJ4osOkNybSmUVRVU2TaZSNq1XAgBtftycJT3%2B5v4Hf%2BFY1AyA%40mail.gmail.com.
Re: Problem with Trac1.5.4 and latest TracDirectoryAuth & TracAccountManager combination [ In reply to ]
Hi Jun,

I've now tested it again with the trunk version, but this version still
produces the error "TemplateNotFound: account_login.html". The fork works
for me.

Regards,
Anke

On Friday, May 19, 2023 at 10:13:30?PM UTC+2 Jun Omae wrote:

> On Sat, May 20, 2023 at 2:28?AM Anke Visser <anke.v...@gmail.com> wrote:
> >
> > Got it!!! Woohoo!!! With the version
> https://github.com/nielx/trac-accountmanager-fork I got the trace of an
> old python 2.7 call. Now I can login using LDAP. Thank you very much for
> your help. I almost gave up.
> >
> > Regards,
> > Anke
>
> The fork is incomplete for Trac 1.5.4 and has some mistakes/bugs, so
> I'd recommend using trunk.
>
> --
> Jun Omae <jun...@gmail.com> (?? ?)
>

--
You received this message because you are subscribed to the Google Groups "Trac Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to trac-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/trac-users/6d7af5bd-56d6-4c58-975b-cb0f6c20d17fn%40googlegroups.com.
Re: Problem with Trac1.5.4 and latest TracDirectoryAuth & TracAccountManager combination [ In reply to ]
Please provide log/trac.log after enabling logging with DEBUG level and
reproducing it.

On Mon, May 22, 2023 at 19:26 Anke Visser <anke.visser72@gmail.com> wrote:

> Hi Jun,
>
> I've now tested it again with the trunk version, but this version still
> produces the error "TemplateNotFound: account_login.html". The fork works
> for me.
>
> Regards,
> Anke
>
>
> --
Jun Omae <jun66j5@gmail.com> (?? ?)

--
You received this message because you are subscribed to the Google Groups "Trac Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to trac-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/trac-users/CAEVLMahYzbPU4KtX5fiN_jXyJq%2BSK4xpvd_0dhxZRj2%3DRUpwTw%40mail.gmail.com.
Re: Problem with Trac1.5.4 and latest TracDirectoryAuth & TracAccountManager combination [ In reply to ]
Hi Jun, the log is attached.

On Monday, May 22, 2023 at 1:09:17?PM UTC+2 Jun Omae wrote:

> Please provide log/trac.log after enabling logging with DEBUG level and
> reproducing it.
>
> On Mon, May 22, 2023 at 19:26 Anke Visser <anke.v...@gmail.com> wrote:
>
>> Hi Jun,
>>
>> I've now tested it again with the trunk version, but this version still
>> produces the error "TemplateNotFound: account_login.html". The fork works
>> for me.
>>
>> Regards,
>> Anke
>>
>>
>> --
> Jun Omae <jun...@gmail.com> (?? ?)
>

--
You received this message because you are subscribed to the Google Groups "Trac Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to trac-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/trac-users/c53adbf2-82f3-4aa5-8bdd-4c04df0974b1n%40googlegroups.com.
Re: Problem with Trac1.5.4 and latest TracDirectoryAuth & TracAccountManager combination [ In reply to ]
On Mon, May 22, 2023 at 8:32?PM Anke Visser <anke.visser72@gmail.com> wrote:
>
> Hi Jun, the log is attached.
>
> On Monday, May 22, 2023 at 1:09:17?PM UTC+2 Jun Omae wrote:

Please provide trac.ini and result of the following command in your environment:

$ unzip -l /trac/plugins/TracAccountManager-0.6.dev0-py3.9.egg | grep
account_login

--
Jun Omae <jun66j5@gmail.com> (?? ?)

--
You received this message because you are subscribed to the Google Groups "Trac Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to trac-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/trac-users/CAEVLMaj%2Bs7qUJnYAD4o0MJ9_Kxow0e%2B%3DJD9tLG2Vdmfa5wf3Wg%40mail.gmail.com.
Re: Problem with Trac1.5.4 and latest TracDirectoryAuth & TracAccountManager combination [ In reply to ]
Unzip returns:
2606 2023-05-17 15:24 acct_mgr/templates/genshi/account_login.html
2857 2023-05-17 15:24 acct_mgr/templates/jinja2/account_login.html
account_login.html can be loaded. It works fine with httpasswd. The error
message seems to be caused by something else.




On Monday, May 22, 2023 at 3:16:42?PM UTC+2 Jun Omae wrote:

> On Mon, May 22, 2023 at 8:32?PM Anke Visser <anke.v...@gmail.com> wrote:
> >
> > Hi Jun, the log is attached.
> >
> > On Monday, May 22, 2023 at 1:09:17?PM UTC+2 Jun Omae wrote:
>
> Please provide trac.ini and result of the following command in your
> environment:
>
> $ unzip -l /trac/plugins/TracAccountManager-0.6.dev0-py3.9.egg | grep
> account_login
>
> --
> Jun Omae <jun...@gmail.com> (?? ?)
>

--
You received this message because you are subscribed to the Google Groups "Trac Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to trac-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/trac-users/1325b16f-a1a2-4d6e-a581-c70c26978eabn%40googlegroups.com.
Re: Problem with Trac1.5.4 and latest TracDirectoryAuth & TracAccountManager combination [ In reply to ]
On Mon, May 22, 2023 at 10:51?PM Anke Visser <anke.visser72@gmail.com> wrote:
>
> Unzip returns:
> 2606 2023-05-17 15:24 acct_mgr/templates/genshi/account_login.html
> 2857 2023-05-17 15:24 acct_mgr/templates/jinja2/account_login.html
> account_login.html can be loaded. It works fine with httpasswd. The error message seems to be caused by something else.

The trac.ldap.global has the following line. Don't disable
acct_mgr.api.accountmanager.

acct_mgr.api.accountmanager = disabled

The acct_mgr settings in the [components] section should be deleted or
moved to trac.ini.global.

--
Jun Omae <jun66j5@gmail.com> (?? ?)

--
You received this message because you are subscribed to the Google Groups "Trac Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to trac-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/trac-users/CAEVLMagp%2BMrsseqAPMi11%2BR0Y6Dq%2BDAuH7t6i%3Da2kvRh3hsBdA%40mail.gmail.com.
Re: Problem with Trac1.5.4 and latest TracDirectoryAuth & TracAccountManager combination [ In reply to ]
On Tuesday, May 23, 2023 at 1:20:13?AM UTC+2 Jun Omae wrote:

The trac.ldap.global has the following line. Don't disable
acct_mgr.api.accountmanager.

acct_mgr.api.accountmanager = disabled


Yes, this line is nonsense. I haven't touched the configuration file in the
last 7 years, so I didn't think the config could be a possible cause of the
problem, but it actually was.

Thank you very much for your help,
Anke

--
You received this message because you are subscribed to the Google Groups "Trac Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to trac-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/trac-users/de7e032c-8195-4ed7-8578-154be03e002cn%40googlegroups.com.