Re: Issue tracker not working
Gianluca Ferrazzano <[email protected]>
| Newsgroups | gmane.comp.bug-tracking.roundup.user |
|---|---|
| Message-ID | <[email protected]> |
Hi John Yes we have a backup of the original database and tracker. Yes we have a backup of the tracker now. I am a beginner when it comes to python. The database is postgresql. I'm not sure which template the tracker is based on, how would I find this out? Thanks Gianluca On 26/07/2023 16:38, John P. Rouillard wrote: > Hello Gianluca: > > I'm sorry you have run into issues. Let's see what we can do to fix it. > > Before we get started, a few questions. > > Do you have a backup of your original database and your original > tracker before you started the upgrade? > > Do you have a backup of your database and your tracker as they are > right now? > > How experienced are you with Python? Are you comfortable using > the debugger for example. > > Which database (anydbm, sqlite, mysql, postgresql) are you using? > > Do you know which tracker template your tracker is based on? I think > 'classic' and 'minimal' were the only choices for 1.3.3 and previous. > > Also Ralf, Thomas, Bern, jerrykan any thoughts here? Ideas on how to > set up an handler to get more info (e.g. local variable dump to see > info about self/self._value would be nice)? The TAL code is probably > the area where I have the least experience. > > In message <[email protected]>, > Gianluca Ferrazzano writes: >> I have recently updates the Roundup issue tracker from 1.3.3 to 2.2.0, > That's a big jump. Did you do all the upgrades in one step, or did you > do it in multiple steps? For example: > > * upgrade from 1.3.3 to 1.6.1 and verify things were working > * then do the 1.6.1 to 2.0.0 upgrade and convert to Python3 > * then do the 2.0.0 to 2.2.0 upgrade > > There is no reason I know of that doing it all in one step shouldn't > work. However, if you used mutiple steps, it would help localize it to > a particular release/releases. > >> I have done all the required steps but I am getting this error when I try >> to access the issue tracker. > For all url references, '.../tracker/' means everything up to and > including the tracker designator (if present). For example Roundup > uses https://issues.roundup-tracker.org/ with no 'tracker' designator, > so '.../tracker/' would just be 'https://issues.roundup-tracker.org/'. > If your URL was 'http://tracker.mycompany.com/product/', that would > replace '.../tracker/'. > > What page are you trying to load? > > * an index page (e.g. .../tracker/issue) > * an item page (e.g. .../tracker/issue1) > * a search page (e.g. .../tracker/issue?@template=search) > * the home page (e.g. .../tracker/) > > Can you try loading the status index page: > > .../tracker/status > > or load an index page with only the issue titles: > > .../tracker/index?@columns=title > > by editing the URL in your browser. Neither of these pages should have > date calculations (IIRC). If there is no traceback for these, it will > tell us that the basic machinery is working. > > Do you get an error if you run: > > roundup-admin -i tracker/home/directory display issue1 > > where tracker/home/directory is the home directory for your tracker. (I > assume issue1 exists in the tracker. If you know an issue number you > can use it instead.) > >> Here is the full traceback, what should I do? > It looks like there is some date calculation going on and the _value > is not a Date but a string. I have never seen this before. > > From the traceback this looks like the result of calling reldate. In > the classic template this only happens for the activity or creation > date. Check your templates (probably just the issue templates) using > grep or other tool and see if reldate shows up anywhere else than in: > > tal:content="i/creation/reldate"> </td> > tal:content="i/activity/reldate"> </td> > > You may have tripped across some weird edge case here. Some > comparisions/operations that were allowed in Python 2 are not allowed > in Python 3. If your tracker has some string field that it's trying to > interpret as a date, Python 2 may have ignored the failed subtraction > but Python 3 won't. I doubt that this is the cause but it's the first > thought. > >> Full traceback: >> >> Traceback (most recent call last): >> File "/usr/local/lib/python3.7/dist-packages/roundup-2.2.0-py3.7.egg/roundup/cgi/client.py", line 2021, in renderContext >> result = pt.render(self, None, None, **args) >> File "/usr/local/lib/python3.7/dist-packages/roundup-2.2.0-py3.7.egg/roundup/cgi/engine_zopetal.py", line 94, in render >> tal=1, strictinsert=0)() >> File "/usr/local/lib/python3.7/dist-packages/roundup-2.2.0-py3.7.egg/roundup/cgi/TAL/TALInterpreter.py", line 192, in __call__ >> self.interpret(self.program) >> File "/usr/local/lib/python3.7/dist-packages/roundup-2.2.0-py3.7.egg/roundup/cgi/TAL/TALInterpreter.py", line 236, in interpret >> handlers[opcode](self, args) >> File "/usr/local/lib/python3.7/dist-packages/roundup-2.2.0-py3.7.egg/roundup/cgi/TAL/TALInterpreter.py", line 571, in do_insertStructure_tal >> structure = self.engine.evaluateStructure(expr) >> File "/usr/local/lib/python3.7/dist-packages/roundup-2.2.0-py3.7.egg/roundup/cgi/PageTemplates/TALES.py", line 224, in evaluate >> return expression(self) >> File "/usr/local/lib/python3.7/dist-packages/roundup-2.2.0-py3.7.egg/roundup/cgi/PageTemplates/PythonExpr.py", line 91, in __call__ >> return f() >> File "<string>", line 2, in f >> File "/usr/local/lib/python3.7/dist-packages/roundup-2.2.0-py3.7.egg/roundup/cgi/templating.py", line 978, in renderWith >> return pt.render(self._client, self.classname, req, **args) >> File "/usr/local/lib/python3.7/dist-packages/roundup-2.2.0-py3.7.egg/roundup/cgi/engine_zopetal.py", line 94, in render >> tal=1, strictinsert=0)() >> File "/usr/local/lib/python3.7/dist-packages/roundup-2.2.0-py3.7.egg/roundup/cgi/TAL/TALInterpreter.py", line 192, in __call__ >> self.interpret(self.program) >> File "/usr/local/lib/python3.7/dist-packages/roundup-2.2.0-py3.7.egg/roundup/cgi/TAL/TALInterpreter.py", line 236, in interpret >> handlers[opcode](self, args) >> File "/usr/local/lib/python3.7/dist-packages/roundup-2.2.0-py3.7.egg/roundup/cgi/TAL/TALInterpreter.py", line 680, in do_useMacro >> self.interpret(macro) >> File "/usr/local/lib/python3.7/dist-packages/roundup-2.2.0-py3.7.egg/roundup/cgi/TAL/TALInterpreter.py", line 236, in interpret >> handlers[opcode](self, args) >> File "/usr/local/lib/python3.7/dist-packages/roundup-2.2.0-py3.7.egg/roundup/cgi/TAL/TALInterpreter.py", line 413, in do_optTag_tal >> self.do_optTag(stuff) >> File "/usr/local/lib/python3.7/dist-packages/roundup-2.2.0-py3.7.egg/roundup/cgi/TAL/TALInterpreter.py", line 398, in do_optTag >> return self.no_tag(start, program) >> File "/usr/local/lib/python3.7/dist-packages/roundup-2.2.0-py3.7.egg/roundup/cgi/TAL/TALInterpreter.py", line 392, in no_tag >> self.interpret(program) >> File "/usr/local/lib/python3.7/dist-packages/roundup-2.2.0-py3.7.egg/roundup/cgi/TAL/TALInterpreter.py", line 236, in interpret >> handlers[opcode](self, args) >> File "/usr/local/lib/python3.7/dist-packages/roundup-2.2.0-py3.7.egg/roundup/cgi/TAL/TALInterpreter.py", line 705, in do_defineSlot >> self.interpret(slot) >> File "/usr/local/lib/python3.7/dist-packages/roundup-2.2.0-py3.7.egg/roundup/cgi/TAL/TALInterpreter.py", line 236, in interpret >> handlers[opcode](self, args) >> File "/usr/local/lib/python3.7/dist-packages/roundup-2.2.0-py3.7.egg/roundup/cgi/TAL/TALInterpreter.py", line 644, in do_condition >> self.interpret(block) >> File "/usr/local/lib/python3.7/dist-packages/roundup-2.2.0-py3.7.egg/roundup/cgi/TAL/TALInterpreter.py", line 236, in interpret >> handlers[opcode](self, args) >> File "/usr/local/lib/python3.7/dist-packages/roundup-2.2.0-py3.7.egg/roundup/cgi/TAL/TALInterpreter.py", line 413, in do_optTag_tal >> self.do_optTag(stuff) >> File "/usr/local/lib/python3.7/dist-packages/roundup-2.2.0-py3.7.egg/roundup/cgi/TAL/TALInterpreter.py", line 398, in do_optTag >> return self.no_tag(start, program) >> File "/usr/local/lib/python3.7/dist-packages/roundup-2.2.0-py3.7.egg/roundup/cgi/TAL/TALInterpreter.py", line 392, in no_tag >> self.interpret(program) >> File "/usr/local/lib/python3.7/dist-packages/roundup-2.2.0-py3.7.egg/roundup/cgi/TAL/TALInterpreter.py", line 236, in interpret >> handlers[opcode](self, args) >> File "/usr/local/lib/python3.7/dist-packages/roundup-2.2.0-py3.7.egg/roundup/cgi/TAL/TALInterpreter.py", line 644, in do_condition >> self.interpret(block) >> File "/usr/local/lib/python3.7/dist-packages/roundup-2.2.0-py3.7.egg/roundup/cgi/TAL/TALInterpreter.py", line 236, in interpret >> handlers[opcode](self, args) >> File "/usr/local/lib/python3.7/dist-packages/roundup-2.2.0-py3.7.egg/roundup/cgi/TAL/TALInterpreter.py", line 617, in do_loop_tal >> self.interpret(block) >> File "/usr/local/lib/python3.7/dist-packages/roundup-2.2.0-py3.7.egg/roundup/cgi/TAL/TALInterpreter.py", line 236, in interpret >> handlers[opcode](self, args) >> File "/usr/local/lib/python3.7/dist-packages/roundup-2.2.0-py3.7.egg/roundup/cgi/TAL/TALInterpreter.py", line 413, in do_optTag_tal >> self.do_optTag(stuff) >> File "/usr/local/lib/python3.7/dist-packages/roundup-2.2.0-py3.7.egg/roundup/cgi/TAL/TALInterpreter.py", line 398, in do_optTag >> return self.no_tag(start, program) >> File "/usr/local/lib/python3.7/dist-packages/roundup-2.2.0-py3.7.egg/roundup/cgi/TAL/TALInterpreter.py", line 392, in no_tag >> self.interpret(program) >> File "/usr/local/lib/python3.7/dist-packages/roundup-2.2.0-py3.7.egg/roundup/cgi/TAL/TALInterpreter.py", line 236, in interpret >> handlers[opcode](self, args) >> File "/usr/local/lib/python3.7/dist-packages/roundup-2.2.0-py3.7.egg/roundup/cgi/TAL/TALInterpreter.py", line 644, in do_condition >> self.interpret(block) >> File "/usr/local/lib/python3.7/dist-packages/roundup-2.2.0-py3.7.egg/roundup/cgi/TAL/TALInterpreter.py", line 236, in interpret >> handlers[opcode](self, args) >> File "/usr/local/lib/python3.7/dist-packages/roundup-2.2.0-py3.7.egg/roundup/cgi/TAL/TALInterpreter.py", line 492, in do_insertText_tal >> text = self.engine.evaluateText(stuff[0]) >> File "/usr/local/lib/python3.7/dist-packages/roundup-2.2.0-py3.7.egg/roundup/cgi/PageTemplates/TALES.py", line 230, in evaluateText >> text = self.evaluate(expr) >> File "/usr/local/lib/python3.7/dist-packages/roundup-2.2.0-py3.7.egg/roundup/cgi/PageTemplates/TALES.py", line 224, in evaluate >> return expression(self) >> File "/usr/local/lib/python3.7/dist-packages/roundup-2.2.0-py3.7.egg/roundup/cgi/PageTemplates/Expressions.py", line 198, in __call__ >> return self._eval(econtext) >> File "/usr/local/lib/python3.7/dist-packages/roundup-2.2.0-py3.7.egg/roundup/cgi/PageTemplates/Expressions.py", line 193, in _eval >> return render(ob, econtext.vars) >> File "/usr/local/lib/python3.7/dist-packages/roundup-2.2.0-py3.7.egg/roundup/cgi/PageTemplates/Expressions.py", line 99, in render >> ob = ob() >> File "/usr/local/lib/python3.7/dist-packages/roundup-2.2.0-py3.7.egg/roundup/cgi/templating.py", line 2241, in reldate >> interval = self._value - date.Date('.', translator=self._client) >> TypeError: unsupported operand type(s) for -: 'str' and 'Date' > Have a good day. > > -- > -- rouilj > John Rouillard > =========================================================================== > My employers don't acknowledge my existence much less my opinions.