Tryton - Issues

 

Issue7688

Title Logger can't rename colunm that exist
Priority bug Status chatting
Superseder Nosy List pokoli, resteve, yangoon
Type crash Components trytond
Assigned To Keywords
Reviews

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

Messages
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-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)