Thank you so much!
________________________________
From: David Nečas (Yeti) <y...@gwyddion.net>
Sent: Thursday, May 21, 2020 6:21 AM
To: Gwyddion use discussion <gwyddion-users@lists.sourceforge.net>
Subject: Re: [Gwyddion-users] Module-critical error

On Tue, May 19, 2020 at 09:03:05PM +0000, Berezin, Danila wrote:
> I'm working on a project for penn state and I've been trying to automate some
> basic tasks with this python script. However, everytime it runs I get:
>
> ** (python.exe:12912): WARNING **: Trying to register gtype 'GMountMountFlags'
> as enum when in fact it is of type 'GFlags'
>
> ** (python.exe:12912): WARNING **: Trying to register gtype 'GDriveStartFlags'
> as enum when in fact it is of type 'GFlags'
>
> ** (python.exe:12912): WARNING **: Trying to register gtype 'GSocketMsgFlags'
> as enum when in fact it is of type 'GFlags'

These you get always.   They are warnings inside GLib which we cannot
influence, but they are harmless.

> (python.exe:12912): Module-CRITICAL **: level_func: assertion 'dfield && 
> quark' failed
>
> (python.exe:12912): Module-CRITICAL **: linematch: assertion 'dfield && 
> quark' failed
>
> (python.exe:12912): Module-CRITICAL **: grain_mark: assertion 'dfield && 
> mquark' failed

These mean you are running module functions without selecting what they
they should apply to.  Your script might have open just a single file
containing a single image, but you still need to say it explicitly.
This means using gwy_app_data_browser_select_data_field() as described
in

https://nam01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fgwyddion.net%2Fdocumentation%2Fuser-guide-en%2Fpygwy.html%23pygwy-managing-files&amp;data=02%7C01%7Cdxb5608%40psu.edu%7C5a7f8afaf65646e753a408d7fd74ed99%7C7cf48d453ddb4389a9c1c115526eb52e%7C0%7C1%7C637256550967258475&amp;sdata=MBYRtICFSgFkR39tYcHgeKhTjiJso0oCI1SnPFaTPQA%3D&amp;reserved=0

Otherwise than that, the script tries to run tools (for the Gaussian
filter).  This is not possible as tools are only interactive.  But most
of the operations have a quite direct equivalent in DataField methods.

I fixed the script so that it runs (attached).

Regards,

Yeti

_______________________________________________
Gwyddion-users mailing list
Gwyddion-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gwyddion-users

Reply via email to