GTK could not import widget when using JULES model

Hi everyone, I am using the JULES model, whose control file depends on Cylc, Rose, and FCM to edit.

When I use rose edit to open the interface and click the button of output-profiles, I always receive an error: could not import widget, GtkListStores requires at least one argument. Please note only click this button!

I could not find out how to deal with it, could anyone help me?
Thanks a lot in advance.

You have an issue somewhere in your app, without more details (i.e. code) I can’t really tell you anything more than you already know: Somewhere something tried to construct a GtkListStore without passing any arguments (which is an error, since a store should have at least one column)

PS: ‘JULES model’ ‘Cylc’ ‘Rose’ ‘FCM’ aren’t common terms, it would be helpful in future if you linked to things

Thanks a lot for your reply. I guess it may be caused by the missing package of Python? but I’m not sure and do not know how to confirm it.

I don’t know why it’s labelled as “could not import” — The actual message doesn’t look like an import problem at all

To simplify, imagine we have a function like so:

def func(a):
    return a * 2

Something, somewhere, is attempting to call that as simply func() — i.e. without specifying a — and thus hitting a problem. Fortunately Python has noticed this mistake and raised an error which your app has then caught and, for some reason, decided to describe it as an import problem.

I still don’t really know what it is you are using here but it seems to be pygtk/gtk2/python2, you probably want to look into python3 and pygobject/gtk4 since those are all EOL these days.

Actually, the JULES model depends on pygtk, gtk2 and python <2.7, therefore I use these instead of python3. However, it seems that the model also use pygobject, because I also had an error about could not import pygobject before, but when I changed my platform from Ubuntu to CentOS, which had python2 and pygtk itself, this error disappeared, though it still could not import widget…

In danger of going circular: I have no idea what ‘the JULES model’ is or how it relates to you or anything else — sorry I’m not a mind reader :slight_smile:

But yes of course, if its dependencies are pygtk/gtk2/python2 then that is what you’ll need (though really it should port to newer Python/Gtk)

Your screenshot appears to be Windows 10?

As discussed I’m fairly certain there isn’t actually an “import” error here: The app is using pygtk incorrectly

I am so sorry for my unclear expressions. The JULES model is a land surface model, which is used to simulate the processes on the land surface, and this is its website ( I followed the steps on this page to build the model on my Linux system (From scratch | Joint UK Land Environment Simulator (JULES)), including the software of Cylc and Rose (Sorry for that I can just put two links). Besides, I use the FTP, a remote connection tool, to run the server, which is a Linux system.

May JULES STRUCTURES and Introduction — Rose Documentation 2019.01.2 documentation can help?

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.