Tryton - Issues

 

Issue7688

Title Logger can't rename colunm that exist
Priority bug Status resolved
Superseder Nosy List ced, pokoli, resteve, reviewbot, roundup-bot, yangoon
Type crash Components trytond
Assigned To ced Keywords review
Reviews 47701002
View: 47701002

Created on 2018-09-10.08:41:17 by resteve, last changed by roundup-bot.

Messages
New changeset 4d5084802648 by Cédric Krier in branch '4.8':
Use correct number arguments in rename column warning
https://hg.tryton.org/trytond/rev/4d5084802648
New changeset 18168d8af076 by Cédric Krier in branch 'default':
Use correct number arguments in rename column warning
https://hg.tryton.org/tryton-env/rev/18168d8af076
New changeset b887c5469636 by Cédric Krier in branch 'default':
Use correct number arguments in rename column warning
https://hg.tryton.org/trytond/rev/b887c5469636
review47701002 updated at https://codereview.tryton.org/47701002/#ps1
msg44193 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2018-09-27.22:29:17
Here is review47701002 as nobody cares to take the time to submit a proper patch.
msg43784 (view) Author: [hidden] (pokoli) (Tryton committer) (Tryton translator) Date: 2018-09-10.10:46:06
On 9/10/18 10:37 AM, Raimon Esteve wrote:
> msg43774 I known "how to contribute".

If you know how to contribute why not proposing the patch using the standard procedure instead of including the diff on the issue?
msg43783 (view) Author: [hidden] (resteve) Date: 2018-09-10.10:37:19
msg43774 I known "how to contribute".
msg43774 (view) Author: [hidden] (pokoli) (Tryton committer) (Tryton translator) Date: 2018-09-10.08:57:37
Please follow http://www.tryton.org/how-to-contribute.html
msg43773 (view) Author: [hidden] (resteve) Date: 2018-09-10.08:41:17
Error logger warnimg when rename a column that exist:

Traceback (most recent call last):
  File "/usr/lib/python2.7/logging/__init__.py", line 861, in emit
    msg = self.format(record)
  File "/usr/lib/python2.7/logging/__init__.py", line 734, in format
    return fmt.format(record)
  File "/usr/lib/python2.7/logging/__init__.py", line 465, in format
    record.message = record.getMessage()
  File "/usr/lib/python2.7/logging/__init__.py", line 329, in getMessage
    msg = msg % self.args
TypeError: not all arguments converted during string formatting
Logged from file table.py, line 124
Traceback (most recent call last):
  File "/usr/lib/python2.7/logging/__init__.py", line 861, in emit
    msg = self.format(record)
  File "/usr/lib/python2.7/logging/__init__.py", line 734, in format
    return fmt.format(record)
  File "/usr/lib/python2.7/logging/__init__.py", line 465, in format
    record.message = record.getMessage()
  File "/usr/lib/python2.7/logging/__init__.py", line 329, in getMessage
    msg = msg % self.args
TypeError: not all arguments converted during string formatting
Logged from file table.py, line 124
Traceback (most recent call last):
  File "/usr/lib/python2.7/logging/__init__.py", line 861, in emit
    msg = self.format(record)
  File "/usr/lib/python2.7/logging/__init__.py", line 734, in format
    return fmt.format(record)
  File "/usr/lib/python2.7/logging/__init__.py", line 465, in format
    record.message = record.getMessage()
  File "/usr/lib/python2.7/logging/__init__.py", line 329, in getMessage
    msg = msg % self.args
TypeError: not all arguments converted during string formatting
Logged from file table.py, line 124

To fix:

diff -r b864801190c2 trytond/backend/postgresql/table.py
--- a/trytond/backend/postgresql/table.py       Mon Aug 20 22:54:35 2018 +0200
+++ b/trytond/backend/postgresql/table.py       Mon Sep 10 08:40:25 2018 +0200
@@ -121,7 +121,7 @@
             else:
                 logger.warning(
                     'Unable to rename column %s on table %s to %s.',
-                    old_name, self.table_name, self.table_name, new_name)
+                    old_name, self.table_name, new_name)

     def _update_definitions(self,
             columns=None, constraints=None, indexes=None):
History
Date User Action Args
2018-10-02 13:17:07roundup-botsetmessages: + msg44280
2018-09-28 17:24:13roundup-botsetmessages: + msg44226
2018-09-28 17:24:09roundup-botsetstatus: testing -> resolved
nosy: + roundup-bot
messages: + msg44225
2018-09-27 22:53:58reviewbotsetnosy: + reviewbot
messages: + msg44194
2018-09-27 22:29:17cedsetstatus: chatting -> testing
keyword: + review
nosy: + ced
messages: + msg44193
reviews: 47701002
assignedto: ced
2018-09-10 12:52:36yangoonsetnosy: + yangoon
2018-09-10 10:46:06pokolisetmessages: + msg43784
2018-09-10 10:37:19restevesetmessages: + msg43783
2018-09-10 08:57:37pokolisetnosy: + pokoli
messages: + msg43774
2018-09-10 08:41:17restevecreate

Showing 10 items. Show all history (warning: this could be VERY long)