Mailing List Archive

AttributeError: 'Environment' object has no attribute 'get_db_cnx'
After upgrading to version 1.2. I'm having this error while trying to
create a ticket:

>
> 2017-02-17 21:57:16,946 Trac[main] ERROR: Internal Server Error:
> <RequestWithSession "GET '/newticket'">, referrer
> 'http://sistemas.claudinosa.com.br/timeline'
> Traceback (most recent call last):
> File "build/bdist.linux-x86_64/egg/trac/web/main.py", line 613, in
> _dispatch_request
> dispatcher.dispatch(req)
> File "build/bdist.linux-x86_64/egg/trac/web/main.py", line 263, in
> dispatch
> self._post_process_request(req, *resp)
> File "build/bdist.linux-x86_64/egg/trac/web/main.py", line 444, in
> _post_process_request
> resp = f.post_process_request(req, *resp[:-1])
> File
> "/usr/local/lib/python2.7/dist-packages/TracSubTicketsPlugin-0.2.0.dev_20130618-py2.7.egg/tracsubtickets/web_ui.py",
> line 73, in post_process_request
> children = self.get_children(ticket.id)
> File
> "/usr/local/lib/python2.7/dist-packages/TracSubTicketsPlugin-0.2.0.dev_20130618-py2.7.egg/tracsubtickets/web_ui.py",
> line 104, in get_children
> db = self.env.get_db_cnx()
> *AttributeError: 'Environment' object has no attribute 'get_db_cnx'*


It looks like something on the plugin side. However, it seems that no one
has opened a [1] ticket for the plugin fix.

[1] https://trac.edgewall.org/ticket/12334

Best regards.

--
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 post to this group, send email to trac-users@googlegroups.com.
Visit this group at https://groups.google.com/group/trac-users.
For more options, visit https://groups.google.com/d/optout.
Re: AttributeError: 'Environment' object has no attribute 'get_db_cnx' [ In reply to ]
On Friday, February 17, 2017 at 5:36:02 PM UTC-8, ivanelson wrote:
>
> After upgrading to version 1.2. I'm having this error while trying to
> create a ticket:
>
>>
>> 2017-02-17 21:57:16,946 Trac[main] ERROR: Internal Server Error:
>> <RequestWithSession "GET '/newticket'">, referrer '
>> http://sistemas.claudinosa.com.br/timeline'
>> Traceback (most recent call last):
>> File "build/bdist.linux-x86_64/egg/trac/web/main.py", line 613, in
>> _dispatch_request
>> dispatcher.dispatch(req)
>> File "build/bdist.linux-x86_64/egg/trac/web/main.py", line 263, in
>> dispatch
>> self._post_process_request(req, *resp)
>> File "build/bdist.linux-x86_64/egg/trac/web/main.py", line 444, in
>> _post_process_request
>> resp = f.post_process_request(req, *resp[:-1])
>> File
>> "/usr/local/lib/python2.7/dist-packages/TracSubTicketsPlugin-0.2.0.dev_20130618-py2.7.egg/tracsubtickets/web_ui.py",
>> line 73, in post_process_request
>> children = self.get_children(ticket.id)
>> File
>> "/usr/local/lib/python2.7/dist-packages/TracSubTicketsPlugin-0.2.0.dev_20130618-py2.7.egg/tracsubtickets/web_ui.py",
>> line 104, in get_children
>> db = self.env.get_db_cnx()
>> *AttributeError: 'Environment' object has no attribute 'get_db_cnx'*
>
>
> It looks like something on the plugin side. However, it seems that no one
> has opened a [1] ticket for the plugin fix.
>
> [1] https://trac.edgewall.org/ticket/12334
>
> Best regards.
>

The issue is fixed in the repository. Try installing from master of:
https://github.com/trac-hacks/trac-subtickets-plugin

- Ryan


--
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 post to this group, send email to trac-users@googlegroups.com.
Visit this group at https://groups.google.com/group/trac-users.
For more options, visit https://groups.google.com/d/optout.
Re: AttributeError: 'Environment' object has no attribute 'get_db_cnx' [ In reply to ]
Solved! Thank you.


Em sábado, 18 de fevereiro de 2017 16:13:55 UTC-3, RjOllos escreveu:
>
>
>
> On Friday, February 17, 2017 at 5:36:02 PM UTC-8, ivanelson wrote:
>>
>> After upgrading to version 1.2. I'm having this error while trying to
>> create a ticket:
>>
>>>
>>> 2017-02-17 21:57:16,946 Trac[main] ERROR: Internal Server Error:
>>> <RequestWithSession "GET '/newticket'">, referrer '
>>> http://sistemas.claudinosa.com.br/timeline'
>>> Traceback (most recent call last):
>>> File "build/bdist.linux-x86_64/egg/trac/web/main.py", line 613, in
>>> _dispatch_request
>>> dispatcher.dispatch(req)
>>> File "build/bdist.linux-x86_64/egg/trac/web/main.py", line 263, in
>>> dispatch
>>> self._post_process_request(req, *resp)
>>> File "build/bdist.linux-x86_64/egg/trac/web/main.py", line 444, in
>>> _post_process_request
>>> resp = f.post_process_request(req, *resp[:-1])
>>> File
>>> "/usr/local/lib/python2.7/dist-packages/TracSubTicketsPlugin-0.2.0.dev_20130618-py2.7.egg/tracsubtickets/web_ui.py",
>>> line 73, in post_process_request
>>> children = self.get_children(ticket.id)
>>> File
>>> "/usr/local/lib/python2.7/dist-packages/TracSubTicketsPlugin-0.2.0.dev_20130618-py2.7.egg/tracsubtickets/web_ui.py",
>>> line 104, in get_children
>>> db = self.env.get_db_cnx()
>>> *AttributeError: 'Environment' object has no attribute 'get_db_cnx'*
>>
>>
>> It looks like something on the plugin side. However, it seems that no one
>> has opened a [1] ticket for the plugin fix.
>>
>> [1] https://trac.edgewall.org/ticket/12334
>>
>> Best regards.
>>
>
> The issue is fixed in the repository. Try installing from master of:
> https://github.com/trac-hacks/trac-subtickets-plugin
>
> - Ryan
>
>

--
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 post to this group, send email to trac-users@googlegroups.com.
Visit this group at https://groups.google.com/group/trac-users.
For more options, visit https://groups.google.com/d/optout.
Re: AttributeError: 'Environment' object has no attribute 'get_db_cnx' [ In reply to ]
On Mon, Oct 9, 2017 at 1:22 AM, Mike Dewhirst <miked@dewhirst.com.au> wrote:

> How can I deal with this?
>
> There seem to be a number of tickets discussing this error and my
> interpretation is it should be fixed in 1.2. However, I have recently
> upgraded from 1.0 to 1.2 as indicated below in the Trac version. However,
> when I click on the Plugins page Trac 1.0 appears instead of 1.2.2. Maybe
> that is evidence I did it badly. An earlier thread "[Trac] Re: multiple
> projects transition from a single project?" finishing on 28 September
> covers Ryan's valiant and eventually successful effort to get me going
> again a couple of weeks ago.
>
> It is reproducible by clicking [Save changes] at the /General\ tab on the
> Preferences page. All the other tabs with [Save changes] work without error.
>
> It is also reproducible by clicking [Restart] on the Accounts |
> Configuration | Password Refresh section (at .../admin/accounts/config)
> whether Silently update password hashes ... is ticked or not
>
> It is also reproducible by clicking the Accounts | Users link on the same
> page (at .../admin/accounts/config)
>
> I couldn't find the error elsewhere. But in trying things, I did discover
> a Custom Fields KeyError: 'width' which I'll now write up in a separate
> thread.
>
> I have all the _ADMIN permissions including ACCTMGR_ADMIN,
> ACCTMGR_CONFIG_ADMIN and ACCTMGR_USER_ADMIN
>
> Thanks for any hints.
>
> Mike
>
>
> Oops…
>
> *Trac detected an internal error:*
>
> AttributeError: 'Environment' object has no attribute 'get_db_cnx'
>
> This is probably a local installation issue.
>
>
> Found a bug in Trac?
>
> If you think this should work and you can reproduce the problem, you
> should consider creating a bug report.
>
> Note that the following plugins seem to be involved: TracAccountManager,
> TracVote*Please report this issue to the plugin maintainer.*
>
> Before you do that, though, please first try*searching <
> http://trac-hacks.org/search?ticket=yes&noquickjump=1&q=Att
> ributeError%3A+%27Environment%27+object+has+no+attribute+%27get_db_cnx%27>for
> similar issues*, as it is quite likely that this problem has been reported
> before. For questions about installation and configuration of Trac or its
> plugins, please try themailing list <http://trac.edgewall.org/wiki
> /MailingList>instead of creating a ticket.
>
> Otherwise, pleasea new bug report describing the problem and explain how
> to reproduce it.
>
>
> Python Traceback
>
> Most recent call last:
>
> File "/usr/local/lib/python2.7/dist-packages/trac/web/main.py", line 623,
> in _dispatch_request
> dispatcher.dispatch(req)
> File "/usr/local/lib/python2.7/dist-packages/trac/web/main.py", line 206,
> in dispatch
> chosen_handler = self._pre_process_request(req, chosen_handler)
> File "/usr/local/lib/python2.7/dist-packages/trac/web/main.py", line 431,
> in _pre_process_request
> chosen_handler = filter_.pre_process_request(req, chosen_handler)
> File "/usr/local/lib/python2.7/dist-packages/acct_mgr/register.py", line
> 485, in pre_process_request
> EmailCheck(self.env).validate_registration(req)
> File "/usr/local/lib/python2.7/dist-packages/acct_mgr/register.py", line
> 254, in validate_registration
> elif email_associated(self.env, email):
> File "/usr/local/lib/python2.7/dist-packages/acct_mgr/model.py", line 25,
> in email_associated
> db = _get_db(env, db)
> File "/usr/local/lib/python2.7/dist-packages/acct_mgr/model.py", line
> 292, in _get_db
> return db or env.get_db_cnx()
>
> ------------------------------------------------------------------------
>
>
> System Information
>
> Package Version
> Trac 1.2.2
> Babel 0.9.6
> Docutils 0.9.1
> Genshi 0.7 (without speedups)
> mod_wsgi 4.3.0 (WSGIProcessGroup WSGIApplicationGroup %(GLOBAL))
> Pygments 2.1
> pysqlite 2.6.0
> Python 2.7.12 (default, Nov 19 2016, 06:48:10) [GCC 5.4.0 20160609]
> pytz 2012d
> setuptools 36.5.0
> SQLite 3.11.0
> Subversion 1.9.3 (r1718519)
>
>
> Installed Plugins
>
> Name Version Location
> TracAccountManager <http://trac-hacks.org/wiki/AccountManagerPlugin>
> 0.4.4 /usr/local/lib/python2.7/dist-packages <
> https://trac.climate.com.au/ssds/prefs#frame0>
> TracCustomFieldAdmin <http://trac-hacks.org/wiki/CustomFieldAdminPlugin>
> 0.2.8.post13289 /usr/local/lib/python2.7/dist-
> packages/TracCustomFieldAdmin-0.2.8_r13289-py2.7.egg
> TracVote <https://trac-hacks.org/wiki/VotePlugin> 0.6.0
> /usr/local/lib/python2.7/dist-packages <https://trac.climate.com.au/s
> sds/prefs#frame0>
>
>
> Interface Customization
>
> Site templates site.html
> Shared templates
> Site static resources
> Shared static resources


You need to install version 0.5dev of TracAccountManager. Suggested steps:

$ pip uninstall TracAccountManager
$ pip install svn+https://trac-hacks.org/svn/accountmanagerplugin/trunk


- Ryan

--
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 post to this group, send email to trac-users@googlegroups.com.
Visit this group at https://groups.google.com/group/trac-users.
For more options, visit https://groups.google.com/d/optout.
Re: AttributeError: 'Environment' object has no attribute 'get_db_cnx' [ In reply to ]
Tried:

$ pip uninstall TracAccountManager
$ pip install svn+https://trac-hacks.org/svn/accountmanagerplugin/trunk


But no succuss.

On Monday, October 9, 2017 at 4:28:48 AM UTC-4, RjOllos wrote:
>
>
>
> On Mon, Oct 9, 2017 at 1:22 AM, Mike Dewhirst <mi...@dewhirst.com.au
> <javascript:>> wrote:
>
>> How can I deal with this?
>>
>> There seem to be a number of tickets discussing this error and my
>> interpretation is it should be fixed in 1.2. However, I have recently
>> upgraded from 1.0 to 1.2 as indicated below in the Trac version. However,
>> when I click on the Plugins page Trac 1.0 appears instead of 1.2.2. Maybe
>> that is evidence I did it badly. An earlier thread "[Trac] Re: multiple
>> projects transition from a single project?" finishing on 28 September
>> covers Ryan's valiant and eventually successful effort to get me going
>> again a couple of weeks ago.
>>
>> It is reproducible by clicking [Save changes] at the /General\ tab on the
>> Preferences page. All the other tabs with [Save changes] work without error.
>>
>> It is also reproducible by clicking [Restart] on the Accounts |
>> Configuration | Password Refresh section (at .../admin/accounts/config)
>> whether Silently update password hashes ... is ticked or not
>>
>> It is also reproducible by clicking the Accounts | Users link on the same
>> page (at .../admin/accounts/config)
>>
>> I couldn't find the error elsewhere. But in trying things, I did discover
>> a Custom Fields KeyError: 'width' which I'll now write up in a separate
>> thread.
>>
>> I have all the _ADMIN permissions including ACCTMGR_ADMIN,
>> ACCTMGR_CONFIG_ADMIN and ACCTMGR_USER_ADMIN
>>
>> Thanks for any hints.
>>
>> Mike
>>
>>
>> Oops…
>>
>> *Trac detected an internal error:*
>>
>> AttributeError: 'Environment' object has no attribute 'get_db_cnx'
>>
>> This is probably a local installation issue.
>>
>>
>> Found a bug in Trac?
>>
>> If you think this should work and you can reproduce the problem, you
>> should consider creating a bug report.
>>
>> Note that the following plugins seem to be involved: TracAccountManager,
>> TracVote*Please report this issue to the plugin maintainer.*
>>
>> Before you do that, though, please first try*searching <
>> http://trac-hacks.org/search?ticket=yes&noquickjump=1&q=AttributeError%3A+%27Environment%27+object+has+no+attribute+%27get_db_cnx%27>for
>> similar issues*, as it is quite likely that this problem has been reported
>> before. For questions about installation and configuration of Trac or its
>> plugins, please try themailing list <
>> http://trac.edgewall.org/wiki/MailingList>instead of creating a ticket.
>>
>> Otherwise, pleasea new bug report describing the problem and explain how
>> to reproduce it.
>>
>>
>> Python Traceback
>>
>> Most recent call last:
>>
>> File "/usr/local/lib/python2.7/dist-packages/trac/web/main.py", line 623,
>> in _dispatch_request
>> dispatcher.dispatch(req)
>> File "/usr/local/lib/python2.7/dist-packages/trac/web/main.py", line 206,
>> in dispatch
>> chosen_handler = self._pre_process_request(req, chosen_handler)
>> File "/usr/local/lib/python2.7/dist-packages/trac/web/main.py", line 431,
>> in _pre_process_request
>> chosen_handler = filter_.pre_process_request(req, chosen_handler)
>> File "/usr/local/lib/python2.7/dist-packages/acct_mgr/register.py", line
>> 485, in pre_process_request
>> EmailCheck(self.env).validate_registration(req)
>> File "/usr/local/lib/python2.7/dist-packages/acct_mgr/register.py", line
>> 254, in validate_registration
>> elif email_associated(self.env, email):
>> File "/usr/local/lib/python2.7/dist-packages/acct_mgr/model.py", line 25,
>> in email_associated
>> db = _get_db(env, db)
>> File "/usr/local/lib/python2.7/dist-packages/acct_mgr/model.py", line
>> 292, in _get_db
>> return db or env.get_db_cnx()
>>
>> ------------------------------------------------------------------------
>>
>>
>> System Information
>>
>> Package Version
>> Trac 1.2.2
>> Babel 0.9.6
>> Docutils 0.9.1
>> Genshi 0.7 (without speedups)
>> mod_wsgi 4.3.0 (WSGIProcessGroup WSGIApplicationGroup %(GLOBAL))
>> Pygments 2.1
>> pysqlite 2.6.0
>> Python 2.7.12 (default, Nov 19 2016, 06:48:10) [GCC 5.4.0 20160609]
>> pytz 2012d
>> setuptools 36.5.0
>> SQLite 3.11.0
>> Subversion 1.9.3 (r1718519)
>>
>>
>> Installed Plugins
>>
>> Name Version Location
>> TracAccountManager <http://trac-hacks.org/wiki/AccountManagerPlugin>
>> 0.4.4 /usr/local/lib/python2.7/dist-packages <
>> https://trac.climate.com.au/ssds/prefs#frame0>
>> TracCustomFieldAdmin <http://trac-hacks.org/wiki/CustomFieldAdminPlugin>
>> 0.2.8.post13289
>> /usr/local/lib/python2.7/dist-packages/TracCustomFieldAdmin-0.2.8_r13289-py2.7.egg
>>
>> TracVote <https://trac-hacks.org/wiki/VotePlugin> 0.6.0
>> /usr/local/lib/python2.7/dist-packages <
>> https://trac.climate.com.au/ssds/prefs#frame0>
>>
>>
>> Interface Customization
>>
>> Site templates site.html
>> Shared templates
>> Site static resources
>> Shared static resources
>
>
> You need to install version 0.5dev of TracAccountManager. Suggested steps:
>
> $ pip uninstall TracAccountManager
> $ pip install svn+https://trac-hacks.org/svn/accountmanagerplugin/trunk
>
>
> - Ryan
>

--
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 post to this group, send email to trac-users@googlegroups.com.
Visit this group at https://groups.google.com/group/trac-users.
For more options, visit https://groups.google.com/d/optout.
Re: AttributeError: 'Environment' object has no attribute 'get_db_cnx' [ In reply to ]
On Monday, February 19, 2018 at 10:18:06 AM UTC-8, David S wrote:
>
> Tried:
>
> $ pip uninstall TracAccountManager
> $ pip install svn+https://trac-hacks.org/svn/accountmanagerplugin/trunk
>
>
> But no succuss.
>

Repeat the "uninstall" command until it reports "not installed". It's
common to have eggs installed for multiple versions if you haven't been
using pip previously, since setuptools does not provide an uninstall tool.

- Ryan

--
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 post to this group, send email to trac-users@googlegroups.com.
Visit this group at https://groups.google.com/group/trac-users.
For more options, visit https://groups.google.com/d/optout.
Re: AttributeError: 'Environment' object has no attribute 'get_db_cnx' [ In reply to ]
Thanks for your quick response! This must be being caused by a different
issue, although the error message is the same. The error is occuring while
trying to enable the Agilo trac plugin. Maybe it is better to head over to
Agilo to fix this?

trac-admin /home/user/Development/TracEnv/TracProject/ upgrade
>
> The upgrade failed. Please fix the issue and try again.
>
> AttributeError: 'Environment' object has no attribute 'get_db_cnx'
>
> Using mysql database connection and a new trac project. Trac is installed
in a virtualenv. Trac project installs okay. Then added agilo.* = enable to
conf/trac.ini. Finally, running trac-admin upgrade results in the above
error.



On Monday, February 19, 2018 at 5:31:52 PM UTC-5, RjOllos wrote:
>
>
>
> On Monday, February 19, 2018 at 10:18:06 AM UTC-8, David S wrote:
>>
>> Tried:
>>
>> $ pip uninstall TracAccountManager
>> $ pip install svn+https://trac-hacks.org/svn/accountmanagerplugin/trunk
>>
>>
>> But no succuss.
>>
>
> Repeat the "uninstall" command until it reports "not installed". It's
> common to have eggs installed for multiple versions if you haven't been
> using pip previously, since setuptools does not provide an uninstall tool.
>
> - Ryan
>

--
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 post to this group, send email to trac-users@googlegroups.com.
Visit this group at https://groups.google.com/group/trac-users.
For more options, visit https://groups.google.com/d/optout.
Re: AttributeError: 'Environment' object has no attribute 'get_db_cnx' [ In reply to ]
But yes, multiple uninstalls of TracAccountManager did not prove successful.

On Monday, February 19, 2018 at 11:22:36 PM UTC-5, David S wrote:
>
> Thanks for your quick response! This must be being caused by a different
> issue, although the error message is the same. The error is occuring while
> trying to enable the Agilo trac plugin. Maybe it is better to head over to
> Agilo to fix this?
>
> trac-admin /home/user/Development/TracEnv/TracProject/ upgrade
>>
>> The upgrade failed. Please fix the issue and try again.
>>
>> AttributeError: 'Environment' object has no attribute 'get_db_cnx'
>>
>> Using mysql database connection and a new trac project. Trac is installed
> in a virtualenv. Trac project installs okay. Then added agilo.* = enable to
> conf/trac.ini. Finally, running trac-admin upgrade results in the above
> error.
>
>
>
> On Monday, February 19, 2018 at 5:31:52 PM UTC-5, RjOllos wrote:
>>
>>
>>
>> On Monday, February 19, 2018 at 10:18:06 AM UTC-8, David S wrote:
>>>
>>> Tried:
>>>
>>> $ pip uninstall TracAccountManager
>>> $ pip install svn+https://trac-hacks.org/svn/accountmanagerplugin/trunk
>>>
>>>
>>> But no succuss.
>>>
>>
>> Repeat the "uninstall" command until it reports "not installed". It's
>> common to have eggs installed for multiple versions if you haven't been
>> using pip previously, since setuptools does not provide an uninstall tool.
>>
>> - Ryan
>>
>

--
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 post to this group, send email to trac-users@googlegroups.com.
Visit this group at https://groups.google.com/group/trac-users.
For more options, visit https://groups.google.com/d/optout.
Re: AttributeError: 'Environment' object has no attribute 'get_db_cnx' [ In reply to ]
From: David S
Sent: Monday, February 19, 20:23
Subject: Re: [Trac] AttributeError: 'Environment' object has no attribute 'get_db_cnx'
To: Trac Users


But yes, multiple uninstalls of TracAccountManager did not prove successful.

On Monday, February 19, 2018 at 11:22:36 PM UTC-5, David S wrote:
Thanks for your quick response! This must be being caused by a different issue, although the error message is the same. The error is occuring while trying to enable the Agilo trac plugin. Maybe it is better to head over to Agilo to fix this?




Please share the full tracelog from the exception.

Ryan

--
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 post to this group, send email to trac-users@googlegroups.com.
Visit this group at https://groups.google.com/group/trac-users.
For more options, visit https://groups.google.com/d/optout.
Re: AttributeError: 'Environment' object has no attribute 'get_db_cnx' [ In reply to ]
Please share the full traceback associated with the exception.

Ryan

--
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 post to this group, send email to trac-users@googlegroups.com.
Visit this group at https://groups.google.com/group/trac-users.
For more options, visit https://groups.google.com/d/optout.
Re: AttributeError: 'Environment' object has no attribute 'get_db_cnx' [ In reply to ]
traceback?

On Monday, February 19, 2018 at 11:28:18 PM UTC-5, RjOllos wrote:
>
> Please share the full traceback associated with the exception.
>
> Ryan
>

--
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 post to this group, send email to trac-users@googlegroups.com.
Visit this group at https://groups.google.com/group/trac-users.
For more options, visit https://groups.google.com/d/optout.
Re: AttributeError: 'Environment' object has no attribute 'get_db_cnx' [ In reply to ]
From: David S
Sent: Monday, February 19, 21:10
Subject: Re: [Trac] AttributeError: 'Environment' object has no attribute 'get_db_cnx'
To: Trac Users


traceback?


Excerpt from log showing error trace.


--
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 post to this group, send email to trac-users@googlegroups.com.
Visit this group at https://groups.google.com/group/trac-users.
For more options, visit https://groups.google.com/d/optout.
Re: AttributeError: 'Environment' object has no attribute 'get_db_cnx' [ In reply to ]
Hm. Directory ./log is empty. Is it somewhere else?

-----Original message-----
From: Ryan Ollos <rjollos@gmail.com>
To: "trac-users@googlegroups.com" <trac-users@googlegroups.com>
Sent: Tue, Feb 20, 2018 05:17:11 GMT+00:00
Subject: Re: [Trac] AttributeError: 'Environment' object has no attribute
'get_db_cnx'



From: David S
Sent: Monday, February 19, 21:10
Subject: Re: [Trac] AttributeError: 'Environment' object has no attribute
'get_db_cnx'
To: Trac Users


traceback?


Excerpt from log showing error trace.


--
You received this message because you are subscribed to a topic in the
Google Groups "Trac Users" group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/trac-users/KtuRDCN60us/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
trac-users+unsubscribe@googlegroups.com.
To post to this group, send email to trac-users@googlegroups.com.
Visit this group at https://groups.google.com/group/trac-users.
For more options, visit https://groups.google.com/d/optout.

--
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 post to this group, send email to trac-users@googlegroups.com.
Visit this group at https://groups.google.com/group/trac-users.
For more options, visit https://groups.google.com/d/optout.
Re: AttributeError: 'Environment' object has no attribute 'get_db_cnx' [ In reply to ]
Let's start over. Where did you see the error "AttributeError:
'Environment' object has no attribute 'get_db_cnx'"? If you saw it on page
while navigating Trac, please send a screen capture.

- Ryan

--
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 post to this group, send email to trac-users@googlegroups.com.
Visit this group at https://groups.google.com/group/trac-users.
For more options, visit https://groups.google.com/d/optout.
Re: AttributeError: 'Environment' object has no attribute 'get_db_cnx' [ In reply to ]
Error is occurring on the command line when trying to upgrade the database,
after enabling Agilo plug-in in trac.ini (agilo.* = enabled). Trac is
installed in a virtualenv. After a new project is created, Agilo
installation requires adding to trac.ini. Agilo's docs state only to add
"agilo.* = enabled". Adding only this line and running upgrade results in
the output: "Database is up to date, no upgrade necessary." This is invalid
because elsewhere it is stated that this command ought to produce updates
to the database. However, on trac installation for plug-ins, it states to
add plug-ins under a section titled "[component]". Adding this section to
trac.ini, then adding "agilo.* = enabled" below this, results in the error
below:

$ uname -a
> Linux localhost.localdomain 4.14.14-200.fc26.x86_64 #1 SMP Fri Jan 19
> 13:27:06 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

$ trac-admin /home/user/Development/TracEnv/TracProject/ upgrade
> The upgrade failed. Please fix the issue and try again.
> AttributeError: 'Environment' object has no attribute 'get_db_cnx'



On Tuesday, February 20, 2018 at 1:22:39 AM UTC-5, RjOllos wrote:
>
> Let's start over. Where did you see the error "AttributeError:
> 'Environment' object has no attribute 'get_db_cnx'"? If you saw it on page
> while navigating Trac, please send a screen capture.
>
> - Ryan
>

--
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 post to this group, send email to trac-users@googlegroups.com.
Visit this group at https://groups.google.com/group/trac-users.
For more options, visit https://groups.google.com/d/optout.
Re: AttributeError: 'Environment' object has no attribute 'get_db_cnx' [ In reply to ]
On Tue, Feb 20, 2018 at 10:16 AM, David S <davidshumway@gmail.com> wrote:

> Error is occurring on the command line when trying to upgrade the
> database, after enabling Agilo plug-in in trac.ini (agilo.* = enabled).
> Trac is installed in a virtualenv. After a new project is created, Agilo
> installation requires adding to trac.ini. Agilo's docs state only to add
> "agilo.* = enabled". Adding only this line and running upgrade results in
> the output: "Database is up to date, no upgrade necessary." This is invalid
> because elsewhere it is stated that this command ought to produce updates
> to the database. However, on trac installation for plug-ins, it states to
> add plug-ins under a section titled "[component]". Adding this section to
> trac.ini, then adding "agilo.* = enabled" below this, results in the error
> below:
>
> $ uname -a
>> Linux localhost.localdomain 4.14.14-200.fc26.x86_64 #1 SMP Fri Jan 19
>> 13:27:06 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
>
> $ trac-admin /home/user/Development/TracEnv/TracProject/ upgrade
>> The upgrade failed. Please fix the issue and try again.
>> AttributeError: 'Environment' object has no attribute 'get_db_cnx'
>
>
I'm pretty sure Agilo doesn't yet support Trac 1.2.

You can get more information on the AttributeError from the log file, which
will be at:
/home/user/Development/TracEnv/TracProject/log/trac.log

In the log file there should be a traceback showing leading up to the
exception "AttributeError". The traceback shows where the exception
originated, and propagation up the call stack.

- Ryan

--
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 post to this group, send email to trac-users@googlegroups.com.
Visit this group at https://groups.google.com/group/trac-users.
For more options, visit https://groups.google.com/d/optout.
Re: AttributeError: 'Environment' object has no attribute 'get_db_cnx' [ In reply to ]
Ah, okay. Oops, did not consider a version issue. Thanks. Will start
over with a trac version compatible with aglio :)

On 02/20/2018 01:25 PM, Ryan Ollos wrote:
>
>
> On Tue, Feb 20, 2018 at 10:16 AM, David S <davidshumway@gmail.com
> <mailto:davidshumway@gmail.com>> wrote:
>
> Error is occurring on the command line when trying to upgrade the
> database, after enabling Agilo plug-in in trac.ini (agilo.* =
> enabled). Trac is installed in a virtualenv. After a new project is
> created, Agilo installation requires adding to trac.ini. Agilo's
> docs state only to add "agilo.* = enabled". Adding only this line
> and running upgrade results in the output: "Database is up to date,
> no upgrade necessary." This is invalid because elsewhere it is
> stated that this command ought to produce updates to the database.
> However, on trac installation for plug-ins, it states to add
> plug-ins under a section titled "[component]". Adding this section
> to trac.ini, then adding "agilo.* = enabled" below this, results in
> the error below:
>
> $ uname -a
> Linux localhost.localdomain 4.14.14-200.fc26.x86_64 #1 SMP Fri
> Jan 19 13:27:06 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
>
> $ trac-admin /home/user/Development/TracEnv/TracProject/ upgrade
> The upgrade failed. Please fix the issue and try again.
> AttributeError: 'Environment' object has no attribute 'get_db_cnx'
>
>
> I'm pretty sure Agilo doesn't yet support Trac 1.2.
>
> You can get more information on the AttributeError from the log file,
> which will be at:
> /home/user/Development/TracEnv/TracProject/log/trac.log
>
> In the log file there should be a traceback showing leading up to the
> exception "AttributeError". The traceback shows where the exception
> originated, and propagation up the call stack.
>
> - Ryan
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "Trac Users" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/trac-users/KtuRDCN60us/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> trac-users+unsubscribe@googlegroups.com
> <mailto:trac-users+unsubscribe@googlegroups.com>.
> To post to this group, send email to trac-users@googlegroups.com
> <mailto:trac-users@googlegroups.com>.
> Visit this group at https://groups.google.com/group/trac-users.
> For more options, visit https://groups.google.com/d/optout.

--
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 post to this group, send email to trac-users@googlegroups.com.
Visit this group at https://groups.google.com/group/trac-users.
For more options, visit https://groups.google.com/d/optout.
Re: AttributeError: 'Environment' object has no attribute 'get_db_cnx' [ In reply to ]
Okay, it works now. Just to clarify from previous post, in trac.ini it is
"[components]" not "[component]". And adding under "[components]" was still
necessary before upgrade processed. Thanks again ;)

On Tuesday, February 20, 2018 at 1:32:13 PM UTC-5, David S wrote:
>
> Ah, okay. Oops, did not consider a version issue. Thanks. Will start
> over with a trac version compatible with aglio :)
>
> On 02/20/2018 01:25 PM, Ryan Ollos wrote:
> >
> >
> > On Tue, Feb 20, 2018 at 10:16 AM, David S
> > <mailto:>> wrote:
> >
> > Error is occurring on the command line when trying to upgrade the
> > database, after enabling Agilo plug-in in trac.ini (agilo.* =
> > enabled). Trac is installed in a virtualenv. After a new project is
> > created, Agilo installation requires adding to trac.ini. Agilo's
> > docs state only to add "agilo.* = enabled". Adding only this line
> > and running upgrade results in the output: "Database is up to date,
> > no upgrade necessary." This is invalid because elsewhere it is
> > stated that this command ought to produce updates to the database.
> > However, on trac installation for plug-ins, it states to add
> > plug-ins under a section titled "[component]". Adding this section
> > to trac.ini, then adding "agilo.* = enabled" below this, results in
> > the error below:
> >
> > $ uname -a
> > Linux localhost.localdomain 4.14.14-200.fc26.x86_64 #1 SMP Fri
> > Jan 19 13:27:06 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
> >
> > $ trac-admin /home/user/Development/TracEnv/TracProject/ upgrade
> > The upgrade failed. Please fix the issue and try again.
> > AttributeError: 'Environment' object has no attribute
> 'get_db_cnx'
> >
> >
> > I'm pretty sure Agilo doesn't yet support Trac 1.2.
> >
> > You can get more information on the AttributeError from the log file,
> > which will be at:
> > /home/user/Development/TracEnv/TracProject/log/trac.log
> >
> > In the log file there should be a traceback showing leading up to the
> > exception "AttributeError". The traceback shows where the exception
> > originated, and propagation up the call stack.
> >
> > - Ryan
> >
> > --
> > You received this message because you are subscribed to a topic in the
> > Google Groups "Trac Users" group.
> > To unsubscribe from this topic, visit
> > https://groups.google.com/d/topic/trac-users/KtuRDCN60us/unsubscribe.
> > To unsubscribe from this group and all its topics, send an email to
> > trac-users+unsubscribe@googlegroups.com
> > <mailto:trac-users+unsubscribe@googlegroups.com>.
> > To post to this group, send email to trac-users@googlegroups.com
> > <mailto:trac-users@googlegroups.com>.
> > Visit this group at https://groups.google.com/group/trac-users.
> > For more options, visit https://groups.google.com/d/optout.
>

--
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 post to this group, send email to trac-users@googlegroups.com.
Visit this group at https://groups.google.com/group/trac-users.
For more options, visit https://groups.google.com/d/optout.
Re: AttributeError: 'Environment' object has no attribute 'get_db_cnx' [ In reply to ]
On Thursday, March 21, 2024 at 8:01:06?AM UTC-7 jesus...@gmail.com wrote:

Hello,

I'm updating the trac version on my company from version 0.11 to 1.6.
Everything is working fine except the trac-pre-commit-hook which show me
this error message:

* AttributeError: 'Environment' object has no attribute 'get_db_cnx'*

I have tried different pyton trac-pre-commit-hook versions but all of them
give me the same output.

Can you help me to try to solve the problem?

Thans in advance.


Suggest using this
one: https://trac.edgewall.org/browser/tags/trac-1.6/contrib/trac-pre-commit-hook

If you continue to have an issue the problem may be from a plugin.

--
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/221012d5-795f-4180-89e9-b5a366fc5d5bn%40googlegroups.com.
Re: AttributeError: 'Environment' object has no attribute 'get_db_cnx' [ In reply to ]
Great!.

Thanks a lot Ryan for your quick answer. At the end this is working
properly.

I'm going to configure it for the post-commit hook.

Best regards

El jueves, 21 de marzo de 2024 a las 18:43:06 UTC+1, RjOllos escribió:

> On Thursday, March 21, 2024 at 8:01:06?AM UTC-7 jesus...@gmail.com wrote:
>
> Hello,
>
> I'm updating the trac version on my company from version 0.11 to 1.6.
> Everything is working fine except the trac-pre-commit-hook which show me
> this error message:
>
> * AttributeError: 'Environment' object has no attribute 'get_db_cnx'*
>
> I have tried different pyton trac-pre-commit-hook versions but all of them
> give me the same output.
>
> Can you help me to try to solve the problem?
>
> Thans in advance.
>
>
> Suggest using this one:
> https://trac.edgewall.org/browser/tags/trac-1.6/contrib/trac-pre-commit-hook
>
> If you continue to have an issue the problem may be from a plugin.
>

--
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/768d75bc-2e4a-4f88-b493-5a4958b518bbn%40googlegroups.com.