GTK client - PyGObjectParamFlags has not attribute READWRITE

34 views
Skip to first unread message

Raimon Esteve

unread,
Feb 1, 2018, 10:55:07 AM2/1/18
to tryto...@googlegroups.com
Hie,

Since "Replace deprecated usage of params and signals in GTK+3" [1], after login popup I receive an error that has not attribute READWRITE

     13             "text": (gobject.TYPE_STRING, None, "Text",
     14                 "Displayed text", gobject.ParamFlags.READWRITE),

Which version gobject is required?

Last version python-gobject-2 in Ubuntu is 2.28.6 [2]

Here the traceback:

Traceback (most recent call last):
  File "/home/resteve/virtualenv/trydev/tryton/tryton/common/common.py", line 1260, in process
    self.callback(return_)
  File "/home/resteve/virtualenv/trydev/tryton/tryton/gui/main.py", line 858, in _set_preferences
    self.sig_win_menu(prefs=prefs)
  File "/home/resteve/virtualenv/trydev/tryton/tryton/gui/main.py", line 1041, in sig_win_menu
    row_activate=self.menu_row_activate)
  File "/home/resteve/virtualenv/trydev/tryton/tryton/gui/window/view_form/screen/screen.py", line 142, in __init__
    self.switch_view()
  File "/home/resteve/virtualenv/trydev/tryton/tryton/gui/window/view_form/screen/screen.py", line 486, in switch_view
    self.load_view_to_load()
  File "/home/resteve/virtualenv/trydev/tryton/tryton/gui/window/view_form/screen/screen.py", line 507, in load_view_to_load
    self.add_view_id(view_id, view_type)
  File "/home/resteve/virtualenv/trydev/tryton/tryton/gui/window/view_form/screen/screen.py", line 520, in add_view_id
    return self.add_view(view)
  File "/home/resteve/virtualenv/trydev/tryton/tryton/gui/window/view_form/screen/screen.py", line 545, in add_view
    view = View.parse(self, xml_dom, view.get('field_childs'))
  File "/home/resteve/virtualenv/trydev/tryton/tryton/gui/window/view_form/view/__init__.py", line 36, in parse
    from .list import ViewTree
  File "/home/resteve/virtualenv/trydev/tryton/tryton/gui/window/view_form/view/list.py", line 13, in <module>
    from tryton.common.cellrendererbutton import CellRendererButton
  File "/home/resteve/virtualenv/trydev/tryton/tryton/common/cellrendererbutton.py", line 10, in <module>
    class CellRendererButton(gtk.GenericCellRenderer):
  File "/home/resteve/virtualenv/trydev/tryton/tryton/common/cellrendererbutton.py", line 14, in CellRendererButton
    "Displayed text", gobject.ParamFlags.READWRITE),
AttributeError: type object 'PyGObjectParamFlags' has no attribute 'READWRITE'

Thanks

Sergi Almacellas Abellana

unread,
Feb 1, 2018, 11:03:52 AM2/1/18
to tryto...@googlegroups.com
El 01/02/18 a les 16:24, Raimon Esteve ha escrit:
> Hie,
>
> Since "Replace deprecated usage of params and signals in GTK+3" [1],
> after login popup I receive an error that has not attribute READWRITE
>
>      13             "text": (gobject.TYPE_STRING, None, "Text",
>      14                 "Displayed text", gobject.ParamFlags.READWRITE),
>
> Which version gobject is required?
>

Which gtk version do you have? Take in account that tryton requires at
least gtk3.20 or later [1], which IIRC is not avaiable on ubuntu 16.04
(should be installed via ppa)

Indeed you should be using python-object 3.20.0. Which is the output the
following command:

apt list python-gobject

You should see something like:

Listing… Fet
python-gobject/xenial,xenial,now 3.20.0-0ubuntu1 all [installed]


Hope it helps.


[1] http://hg.tryton.org/tryton/file/292a067fe066/doc/installation.rst#l8


--
Sergi Almacellas Abellana
www.koolpi.com
Twitter: @pokoli_srk

Raimon Esteve

unread,
Feb 2, 2018, 4:45:06 AM2/2/18
to tryto...@googlegroups.com
hie,

2018-02-01 17:03 GMT+01:00 Sergi Almacellas Abellana <se...@koolpi.com>:
>
> El 01/02/18 a les 16:24, Raimon Esteve ha escrit:
> > Hie,
> >
> > Since "Replace deprecated usage of params and signals in GTK+3" [1],
> > after login popup I receive an error that has not attribute READWRITE
> >
> > 13 "text": (gobject.TYPE_STRING, None, "Text",
> > 14 "Displayed text", gobject.ParamFlags.READWRITE),
> >
> > Which version gobject is required?
> >
>
> Which gtk version do you have? Take in account that tryton requires at
> least gtk3.20 or later [1], which IIRC is not avaiable on ubuntu 16.04
> (should be installed via ppa)

Ok. I had seen in setup.py and I could not find about requeriments [2]
(py-gobject3 is comment)

> Indeed you should be using python-object 3.20.0. Which is the output the
> following command:
>
> apt list python-gobject
>
> You should see something like:
>
> Listing… Fet
> python-gobject/xenial,xenial,now 3.20.0-0ubuntu1 all [installed]

Ok. Thanks. Finally I have upgraded ubuntu 14.04.2 LTS (end support
Abril 2019) to 16.04 (end support Abril 2021)

$ apt list python-gobject
python-gobject/xenial,xenial,now 3.20.0-0ubuntu1 all [installed,automatic]

$ apt list libgtk-3-0
libgtk-3-0/xenial,now 3.20.8-1ubuntu0~ppa1 amd64 [installed]

At now, the error is about goocalendar and goocanvas, that "goocanvas"
has no attribute 'CanvasText' [See annex 1]

I have last release goocalendar (0.3). Is gooclaendar upgrade to GTK-3?

[ annex 1]
line 39, in parse
from .calendar_ import ViewCalendar
File "/home/resteve/virtualenv/trydev/tryton/tryton/gui/window/view_form/view/calendar_.py",
line 12, in <module>
from .calendar_gtk.calendar_ import Calendar_
File "/home/resteve/virtualenv/trydev/tryton/tryton/gui/window/view_form/view/calendar_gtk/calendar_.py",
line 5, in <module>
import goocalendar
File "/usr/local/lib/python2.7/dist-packages/goocalendar/__init__.py",
line 7, in <module>
goocanvas.Text = goocanvas.CanvasText
AttributeError: 'module' object has no attribute 'CanvasText'

Thanks

> [1] http://hg.tryton.org/tryton/file/292a067fe066/doc/installation.rst#l8

[2] https://bitbucket.org/tryton/tryton/src/292a067fe0668055802d4ba9a065ae97a9d90f3d/setup.py?at=default&fileviewer=file-view-default#setup.py-102

Raimon Esteve

unread,
Feb 5, 2018, 5:45:08 PM2/5/18
to tryto...@googlegroups.com
Hie,
Open in the bugtracker:

https://goocalendar.tryton.org/bug8
Reply all
Reply to author
Forward
0 new messages