New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

python-fu layer group pickling bug #1

efexgee opened this Issue Jun 28, 2016 · 1 comment


None yet
2 participants
Copy link

efexgee commented Jun 28, 2016

If a layer group is active when an interactive plug-in (one that pops up an input box) is called, this error pops up after clicking "OK":

TypeError: can't pickle GroupLayer objects

I think this is a bug and not something I'm doing wrong. I'm still hoping to find a work-around, though.

Full error details:

  File "C:\Program Files\GIMP 2\32\lib\gimp\2.0\python\", line 736, in response
    dialog.res = run_script(params)
  File "C:\Program Files\GIMP 2\32\lib\gimp\2.0\python\", line 360, in run_script
    _set_defaults(proc_name, params)
  File "C:\Program Files\GIMP 2\32\lib\gimp\2.0\python\", line 350, in _set_defaults
    gimpshelf.shelf[key] = defaults
  File "C:\Program Files\GIMP 2\32\lib\gimp\2.0\python\", line 84, in __setitem__
  File "C:\Program Files\GIMP 2\Python\lib\", line 70, in _reduce_ex
    raise TypeError, "can't pickle %s objects" % base.__name__
TypeError: can't pickle GroupLayer objects

This comment has been minimized.

Copy link

stefanbursuc commented Oct 23, 2016

Hi @efexgee.

Did you found a solution meanwile?
I had the same problem and I found a workaround that I want to share.
The problem happens when Gimp tries to save the current selected values as the default values, so the next time you run the script, the fields will be populated with the last values used.

The workaround I found is to comment the following line:

  • 350: gimpshelf.shelf[key] = defaults

in the file:

  • ...\GIMP\32\lib\gimp\2.0\python\

The downside is that you will need to insert all of the values everytime.

I hope it helps :).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment