Opened 13 years ago
Closed 8 years ago
#9625 closed defect (fixed)
AttributeError: 'int' object has no attribute 'rsplit'
Reported by: | anonymous | Owned by: | Colin Guthrie |
---|---|---|---|
Priority: | normal | Component: | WorkLogPlugin |
Severity: | normal | Keywords: | |
Cc: | Trac Release: | 0.12 |
Description (last modified by )
Hello,
I have installed WorkLog plugin latest version available on link WorkLogPlugin. I have done necessary settings as per instructions from your link but I am getting below error when I am trying to click on Start/Stop button first time. After getting error if I go back and click again on Start/ Stop then its working fine.
Trac detected an internal error: AttributeError: 'int' object has no attribute 'rsplit' This is probably a local installation issue.
Some more details.
Trac 0.13dev-r10774 Genshi 0.7dev-r1168 Mercurial 1.9 MySQL server: "5.1.49-3", client: "5.1.49", thread-safe: 1 MySQLdb 1.2.3 Python 2.6.6 (r266:84292, Dec 27 2010, 00:02:40) [GCC 4.4.5] setuptools 0.6c11 jQuery 1.5.1
Regards,
Rahul
Attachments (0)
Change History (5)
comment:1 Changed 13 years ago by
comment:2 follow-up: 3 Changed 12 years ago by
I also had this issue and while the above alteration didn't fix the problem, the following change to the same line in worklog/manager.py (although it's line 81 in the latest release)
From:
81: tckt.save_changes(self.authname, msg, nowdt, None, cnum=cnum+1)
To:
81: tckt.save_changes(self.authname, msg, nowdt, None, cnum=str(cnum+1))
This issue occurred for me on both Trac Release 0.12 and Trac Release 1.0.
comment:3 Changed 12 years ago by
Additionally, I think the problem is that the worklog/manager.py line is passing cnum as an int where it should be passing it as a str. The error relates to the following from http://svn.edgewall.org/repos/trac/branches/1.0-stable/trac/ticket/model.py:
364: return int(cnum.rsplit('.', 1)[-1])
Reading back on the code before that, it appears to assume that it has been passed an str, and if not it will generate an str - which may explain why this issue occurs on some occasions but not others. It may also explain why the first fix on here worked as it added code to pass an empty str.
comment:4 Changed 12 years ago by
I will try to get the issue fixed shortly. Have you tried out the latest revision of the plugin (r12090)? I pushed a lot of changes over the past few days.
comment:5 Changed 8 years ago by
Description: | modified (diff) |
---|---|
Resolution: | → fixed |
Status: | new → closed |
Issue appears to be resolved.
Since:
http://svn.edgewall.org/repos/trac/trunk/trac/ticket/model.py
Something should be changed in worklog/manager.py - currently i've changed:
into
and it works - for now