[openstack-dev] [goals][upgrade-checkers] FYI on "TypeError: Message objects do not support addition." errors
Trinh Nguyen
dangtrinhnt at gmail.com
Tue Nov 6 14:54:05 UTC 2018
Hi Matt,
Thanks for fixing the upgrade checker patch on Searchlight [1]. It works.
[1] https://review.openstack.org/#/c/613789/
On Tue, Nov 6, 2018 at 11:28 PM Matt Riedemann <mriedemos at gmail.com> wrote:
> On 11/5/2018 10:43 AM, Matt Riedemann wrote:
> > If you are seeing this error when implementing and running the upgrade
> > check command in your project:
> >
> > Traceback (most recent call last):
> > File
> >
> "/home/osboxes/git/searchlight/.tox/venv/lib/python3.5/site-packages/oslo_upgradecheck/upgradecheck.py",
>
> > line 184, in main
> > return conf.command.action_fn()
> > File
> >
> "/home/osboxes/git/searchlight/.tox/venv/lib/python3.5/site-packages/oslo_upgradecheck/upgradecheck.py",
>
> > line 134, in check
> > print(t)
> > File
> >
> "/home/osboxes/git/searchlight/.tox/venv/lib/python3.5/site-packages/prettytable.py",
>
> > line 237, in __str__
> > return self.__unicode__()
> > File
> >
> "/home/osboxes/git/searchlight/.tox/venv/lib/python3.5/site-packages/prettytable.py",
>
> > line 243, in __unicode__
> > return self.get_string()
> > File
> >
> "/home/osboxes/git/searchlight/.tox/venv/lib/python3.5/site-packages/prettytable.py",
>
> > line 995, in get_string
> > lines.append(self._stringify_header(options))
> > File
> >
> "/home/osboxes/git/searchlight/.tox/venv/lib/python3.5/site-packages/prettytable.py",
>
> > line 1066, in _stringify_header
> > bits.append(" " * lpad + self._justify(fieldname, width,
> > self._align[field]) + " " * rpad)
> > File
> >
> "/home/osboxes/git/searchlight/.tox/venv/lib/python3.5/site-packages/prettytable.py",
>
> > line 187, in _justify
> > return text + excess * " "
> > File
> >
> "/home/osboxes/git/searchlight/.tox/venv/lib/python3.5/site-packages/oslo_i18n/_message.py",
>
> > line 230, in __add__
> > raise TypeError(msg)
> > TypeError: Message objects do not support addition.
> >
> > It is due to calling oslo_i18n.enable_lazy() somewhere in the command
> > import path. That should be removed from the project since lazy
> > translation is not supported in openstack and as an effort was abandoned
> > several years ago. It is probably still called in a lot of "big
> > tent/stackforge" projects because of initially copying it from the more
> > core projects. Anyway, just remove it.
> >
> > I'm talking with the oslo team about deprecating that interface so
> > projects don't mistakenly use it and expect great things to happen.
>
> If anyone is still running into this, require oslo.upgradecheck>=0.1.1
> to pick up this workaround:
>
> https://review.openstack.org/#/c/615610/
>
> --
>
> Thanks,
>
> Matt
>
> __________________________________________________________________________
> OpenStack Development Mailing List (not for usage questions)
> Unsubscribe: OpenStack-dev-request at lists.openstack.org?subject:unsubscribe
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>
--
*Trinh Nguyen*
*www.edlab.xyz <https://www.edlab.xyz>*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20181106/bd272069/attachment.html>
More information about the OpenStack-dev
mailing list