Opened 14 years ago
Closed 8 years ago
#7182 closed enhancement (fixed)
TracHoursPlugin for 0.12 ?
Reported by: | Owned by: | ||
---|---|---|---|
Priority: | normal | Component: | TracHoursPlugin |
Severity: | normal | Keywords: | |
Cc: | trachours@… | Trac Release: | 0.12 |
Description
Hello,
Is there any plan at the moment to update TracHoursPlugin for Trac 0.12 ?
Attachments (0)
Change History (24)
comment:1 Changed 14 years ago by
Resolution: | → wontfix |
---|---|
Status: | new → closed |
Type: | defect → enhancement |
comment:2 Changed 14 years ago by
Resolution: | wontfix |
---|---|
Status: | closed → reopened |
Hi,
I've created a 0.12-compatibility branch and begun committing patches to make this plugin work against 0.12b1. trachoursplugin/0.12
After a bit of work, that branch is currently working well for my Trac 0.12b1 installation. I haven't tested it extensively though.
Please try it out and feel free to report any issues you find.
comment:3 Changed 14 years ago by
Resolution: | → fixed |
---|---|
Status: | reopened → closed |
comment:4 follow-up: 5 Changed 14 years ago by
Hi, I've installed latest Trac 0.12 and above mentioned branch... but when I run trac-admin upgrade I get:
AttributeError: 'NoneType' object has no attribute 'rollback'
comment:5 follow-up: 6 Changed 14 years ago by
Resolution: | fixed |
---|---|
Status: | closed → reopened |
Replying to Vasja:
Hi, I've installed latest Trac 0.12 and above mentioned branch... but when I run trac-admin upgrade I get:
AttributeError: 'NoneType' object has no attribute 'rollback'
I can reproduce this error. It looks like it might only occur if you enable the "multiproject hours" component of the plugin (I hadn't enabled that earlier, and never saw this error)
After some poking around I see that the exception you gave is masking the real traceback which is:
Traceback (most recent call last): File "/tmp/trachours/0.12/trachours/setup.py", line 53, in upgrade_environment version = self.version() File "/tmp/trachours/0.12/trachours/setup.py", line 68, in version version = get_scalar(self.env, "select value from system where name = 'trachours.db_version';") File "/tmp/trachours/sqlhelper/tracsqlhelper/__init__.py", line 76, in get_scalar data = get_first_row(env, sql, *params) File "/tmp/trachours/sqlhelper/tracsqlhelper/__init__.py", line 20, in __call__ cur = db.cursor() File "build/bdist.linux-x86_64/egg/trac/db/util.py", line 102, in __getattr__ return getattr(self.cnx, name) AttributeError: 'NoneType' object has no attribute 'cursor'
comment:6 Changed 14 years ago by
Replying to anonymous:
I can reproduce this error. It looks like it might only occur if you enable the "multiproject hours" component of the plugin (I hadn't enabled that earlier, and never saw this error)
Scratch that; same error occurs if all components are enabled except for multiproject.
comment:7 Changed 14 years ago by
FWIW the real exception is masked by the catchall exception here:
> /tmp/trachours/trac/trac/db/api.py(77)transaction_wrapper() -> fn(ldb) (Pdb) l 72 elif ldb: 73 fn(ldb) 74 else: 75 ldb = _transaction_local.db = env.get_db_cnx() 76 try: 77 -> fn(ldb) 78 ldb.commit() 79 _transaction_local.db = None 80 except: 81 _transaction_local.db = None 82 ldb.rollback()
comment:8 Changed 14 years ago by
hi, it actually happens also if I only enable basic components of the plugin:
trachours.hours.trachoursplugin = enabled trachours.setup.setuptrachours = enabled
Also I get in debug log following:
2010-06-18 16:04:15,007 Trac[env] WARNING: Component <trachours.setup.SetupTracHours object at 0x24dc410> requires environment upgrade 2010-06-18 16:04:15,014 Trac[env] INFO: trachours.setup.SetupTracHours upgrading... 2010-06-18 16:04:15,016 Trac[console] ERROR: Exception in trac-admin command: Traceback (most recent call last): File "/usr/local/lib/python2.6/dist-packages/Trac-0.12-py2.6.egg/trac/admin/console.py", line 107, in onecmd rv = cmd.Cmd.onecmd(self, line) or 0 File "/usr/lib/python2.6/cmd.py", line 218, in onecmd return self.default(line) File "/usr/local/lib/python2.6/dist-packages/Trac-0.12-py2.6.egg/trac/admin/console.py", line 257, in default return cmd_mgr.execute_command(*args) File "/usr/local/lib/python2.6/dist-packages/Trac-0.12-py2.6.egg/trac/admin/api.py", line 123, in execute_command return f(*fargs) File "/usr/local/lib/python2.6/dist-packages/Trac-0.12-py2.6.egg/trac/env.py", line 790, in _do_upgrade self.env.upgrade(backup=no_backup is None) File "/usr/local/lib/python2.6/dist-packages/Trac-0.12-py2.6.egg/trac/env.py", line 533, in upgrade with_transaction(self)(participant.upgrade_environment) File "/usr/local/lib/python2.6/dist-packages/Trac-0.12-py2.6.egg/trac/db/api.py", line 82, in transaction_wrapper ldb.rollback() File "/usr/local/lib/python2.6/dist-packages/Trac-0.12-py2.6.egg/trac/db/util.py", line 102, in __getattr__ return getattr(self.cnx, name) AttributeError: 'NoneType' object has no attribute 'rollback'
My Trac env: System Information
Trac 0.12 Genshi 0.6 GIT 1.7.0.4 mod_wsgi 2.8 (WSGIProcessGroup WSGIApplicationGroup %{GLOBAL}) pysqlite 2.4.1 Python 2.6.5 (r265:79063, Apr 16 2010, 14:15:55) [GCC 4.4.3] setuptools 0.6 SQLite 3.6.22 Subversion 1.6.6 (r40053) jQuery: 1.4.2 Installed Plugins
BatchModify 0.5.0-trac0.12 /srv/trac/projects/im/plugins/BatchModify-0.5.0_trac0.12-py2.6.egg BreadCrumbsNavPlugin 0.1 /usr/local/lib/python2.6/dist-packages/BreadCrumbsNavPlugin-0.1-py2.6.egg ComponentDependencyPlugin 0.1 /usr/local/lib/python2.6/dist-packages/ComponentDependencyPlugin-0.1-py2.6.egg IniAdmin 0.2 /usr/local/lib/python2.6/dist-packages/IniAdmin-0.2-py2.6.egg STractistics 0.4.2 /usr/local/lib/python2.6/dist-packages/STractistics-0.4.2-py2.6.egg SvnAuthzAdminPlugin 0.1.2.-Moved.to.Trac.0.11- /usr/local/lib/python2.6/dist-packages/SvnAuthzAdminPlugin-0.1.2._Moved.to.Trac.0.11_-py2.6.egg TicketSidebarProvider 0.0 /usr/local/lib/python2.6/dist-packages/TicketSidebarProvider-0.0-py2.6.egg timingandestimationplugin 0.9.4 /usr/local/lib/python2.6/dist-packages/timingandestimationplugin-0.9.4-py2.6.egg TracAccountManager 0.2.1dev-r7737 /usr/local/lib/python2.6/dist-packages/TracAccountManager-0.2.1dev_r7737-py2.6.egg TracGit 0.12.0.2dev-r7757 /usr/local/lib/python2.6/dist-packages/TracGit-0.12.0.2dev_r7757-py2.6.egg TracHoursPlugin 0.5.2 /usr/local/lib/python2.6/dist-packages/TracHoursPlugin-0.5.2-py2.6.egg TracMasterTickets 2.1.3 /usr/local/lib/python2.6/dist-packages/TracMasterTickets-2.1.3-py2.6.egg TracNewsFlash 1.0.1 /usr/local/lib/python2.6/dist-packages/TracNewsFlash-1.0.1-py2.6.egg TracStats 0.3 /usr/local/lib/python2.6/dist-packages/TracStats-0.3-py2.6.egg TracSubTicketsPlugin 0.1.0 /srv/trac/projects/im/plugins/TracSubTicketsPlugin-0.1.0-py2.6.egg TracSVNHooks 0.4 /usr/local/lib/python2.6/dist-packages/TracSVNHooks-0.4-py2.6.egg TracTocMacro 11.0.0.3 /usr/local/lib/python2.6/dist-packages/TracTocMacro-11.0.0.3-py2.6.egg TracWebAdmin 0.1.2dev-r8925 /usr/local/lib/python2.6/dist-packages/TracWebAdmin-0.1.2dev_r8925-py2.6.egg TracWysiwyg 0.2-r7772 /usr/local/lib/python2.6/dist-packages/TracWysiwyg-0.2_r7772-py2.6.egg
Best, Vasja
comment:9 Changed 14 years ago by
Hi Vasja,
I've found a fix for this. It requires a patch on the TracSqlHelperScript dependency. I've reported the issue here: t:#7262
The patch is attached there, along with a warning: the patch fixes the immediate issue, but I'm not sure if it will cause other problems down the road. So please let me know if you see any other problems after this patch..
I'll update this ticket again, and update trachours' dependency, when that patch is committed; in the meantime you can apply it on your local install of sqlhelperscript and it should fix the immediate problem.
comment:11 Changed 14 years ago by
Resolution: | → fixed |
---|---|
Status: | reopened → closed |
I committed the patch to TracSqlHelperScript in a new 0.12 branch there. TracHours 0.12 branch now has an updated dependency on tracsqlhelperscript/0.12 - committed in r8160.
comment:12 follow-up: 13 Changed 12 years ago by
Hi guys,
I tried to install trachoursplugin recently along with all the other dependencies and I am facing the exact issue as above i.e.
AttributeError: 'NoneType' object has no attribute 'rollback'
.
I have used TracHours trunk and Tracsqlhelper 0.12 build and made sure the above patch was in the __init__.py
file. It is and I am still getting this error. Can anyone give please me any ideas as to why this is?
Here are my system details: - Trac 0.12.3 Babel 0.9.5 Genshi 0.6 mod_python 3.3.1 MySQL server: "5.0.51a-24+lenny4-log", client: "5.0.51a", thread-safe: 1 MySQLdb 1.2.2 Python 2.5.2 (r252:60911, Jan 24 2010, 15:24:24) [GCC 4.3.2] setuptools 0.6c11 Subversion 1.5.1 (r32289) jQuery: 1.4.4 ComponentDependencyPlugin 0.1 /plugins/ComponentDependencyPlugin-0.1-py2.5.egg ImageTrac 0.4 /usr/lib/python2.5/site-packages/ImageTrac-0.4-py2.5.egg mail2trac 1 /mailtotracplugin/0.12/plugin ScreenshotPaste 0.1.1 /plugins/ScreenshotPaste-0.1.1-py2.5.egg TicketConditionalCreationStatusPlugin 0.2 /plugins/TicketConditionalCreationStatusPlugin-0.2-py2.5.egg TicketSidebarProvider 0.0 /plugins/TicketSidebarProvider-0.0-py2.5.egg TracDynamicFields 1.2.3 /plugins/TracDynamicFields-1.2.3-py2.5.egg TracTicketChainedFields 0.1 /plugins/TracTicketChainedFields-0.1-py2.5.egg
Thanks.
comment:13 Changed 12 years ago by
Replying to prav:
Are you sure that the error is coming from TracHoursPlugin?
I took a quick look at the other plugins listed in your System Information. It looks like ImageTracPlugin has database-access code, similar to what we fixed in TracHoursPlugin, that would also cause this bug.
Could you try disabling ImageTracPlugin's components and see if the error still occurs?
comment:14 Changed 12 years ago by
There are no rollback
s in TracHoursPlugin, however it could be comming from TracSqlHelperScript.
comment:15 follow-up: 16 Changed 12 years ago by
Well, now that I've read this ticket, I see that my comment wasn't at all helpful ;)
But I see that you are suggesting ImageTracPlugin, probably because it also has a dependency on TracSqlHelperScript? prav: a traceback would be helpful.
comment:16 Changed 12 years ago by
Replying to rjollos:
Well, now that I've read this ticket, I see that my comment wasn't at all helpful ;)
But I see that you are suggesting ImageTracPlugin, probably because it also has a dependency on TracSqlHelperScript? prav: a traceback would be helpful.
I didn't think to look in TracSqlHelperScript -- I just noticed that ImageTracPlugin itself has an IEnvironmentSetupParticipant that uses the now-broken pattern of selecting from a possibly-missing table to check for its existence and catching the database error, as well as doing a funky db.commit()
in its upgrade_environment:
imagetracplugin/0.11/imagetrac/default_image.py#L47
All of that code probably needs to be rewritten to track its own upgrades in the system table instead (or whatever the current practice is; I haven't had a chance to study the code hasienda mentioned on trac-users)
comment:18 Changed 12 years ago by
Hi, I tried some of the sugestions above.
- Tried disabling all components of ImageTrac plugin and I still face the same problem when I try to install TracHours. All the plugins I have mentioned above have been working fine without db issues till I faced this error with TracHours.
- Here is the traceback from the logs when I run into this error: -
2012-10-08 11:31:14,092 Trac[env] WARNING: Component <trachours.setup.SetupTracHours object at 0x957dcec> requires environment upgrade 2012-10-08 11:31:14,152 Trac[env] INFO: trachours.setup.SetupTracHours upgrading... 2012-10-08 11:31:14,196 Trac[console] ERROR: Exception in trac-admin command: Traceback (most recent call last): File "/usr/lib/python2.5/site-packages/Trac-0.12.3-py2.5.egg/trac/admin/console.py", line 107, in onecmd rv = cmd.Cmd.onecmd(self, line) or 0 File "/usr/lib/python2.5/cmd.py", line 218, in onecmd return self.default(line) File "/usr/lib/python2.5/site-packages/Trac-0.12.3-py2.5.egg/trac/admin/console.py", line 275, in default return cmd_mgr.execute_command(*args) File "/usr/lib/python2.5/site-packages/Trac-0.12.3-py2.5.egg/trac/admin/api.py", line 123, in execute_command return f(*fargs) File "/usr/lib/python2.5/site-packages/Trac-0.12.3-py2.5.egg/trac/env.py", line 786, in _do_upgrade self.env.upgrade(backup=no_backup is None) File "/usr/lib/python2.5/site-packages/Trac-0.12.3-py2.5.egg/trac/env.py", line 526, in upgrade with_transaction(self)(participant.upgrade_environment) File "/usr/lib/python2.5/site-packages/Trac-0.12.3-py2.5.egg/trac/db/api.py", line 82, in transaction_wrapper ldb.rollback() File "/usr/lib/python2.5/site-packages/Trac-0.12.3-py2.5.egg/trac/db/util.py", line 102, in __getattr__ return getattr(self.cnx, name) AttributeError: 'NoneType' object has no attribute 'rollback'
I am using the trunk version of trachours and 0.12 branch of tracsqlhelper script.
comment:19 Changed 12 years ago by
Resolution: | fixed |
---|---|
Status: | closed → reopened |
I'll be doing some testing this weekend, also attempting to resolve #7723, so please stand by :)
comment:20 Changed 12 years ago by
Owner: | changed from Jeff Hammel to Ryan J Ollos |
---|---|
Status: | reopened → new |
comment:21 Changed 12 years ago by
Status: | new → assigned |
---|
comment:22 Changed 11 years ago by
Status: | assigned → new |
---|
comment:23 Changed 8 years ago by
Owner: | Ryan J Ollos deleted |
---|
comment:24 Changed 8 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
Plugin currently supports Trac 1.0 and 1.2. Please open a new ticket if you encounter an issue with one of those Trac versions.
I apologize, but I don't have any time to upgrade this plugin right now. If you have the time and ability to maintain it, I'd welcome it being adopted.