Switch to full style
Ask all general Gimp related questions here
Post a reply

Getting errors on all my Python plugins

Fri Nov 19, 2010 10:02 am

I can't use most of the plugins I added to the Gimp 2.6.11 plugin folder. This is the error I receive for every one.....
Can anyone help with this?
Image

Re: Getting errors on all my Python plugins

Fri Nov 19, 2010 10:26 am

Molly, I posted somewhere about that. The old style of tuples was to use brackets [ ] to enclose numerical parameters. Tuples are now enclosed just with parentheses ( ).

Read here:
viewtopic.php?f=9&t=673

Re: Getting errors on all my Python plugins

Fri Nov 19, 2010 11:06 am

o thanx mahvin. I read that but I don't know how to do that stuff so I kind of ignored it. Where do I go to find this stuff I have to fix? :oops: I haven't a clue.

@mahvin, just found the file, now my troubles are over.Image

Re: Getting errors on all my Python plugins

Fri Nov 19, 2010 12:12 pm

Molly
open the script with the notepad (not word, just the simple notepad)
where you see group of numbers enclosed in [] you replace with ()

as example [3,29,55] become (3,29,55)

then i don't know that script, if is old may have other problems.

but if is only for that will be simple to fix...and don't worry script didn't explode , if you do some mistakes at worst the script will remain broken as is it now

Re: Getting errors on all my Python plugins

Fri Nov 19, 2010 12:18 pm

PS if recive that message for ALL your python plugins then they should be all quite old, maybe is better you start a new collection

Re: Getting errors on all my Python plugins

Fri Nov 19, 2010 12:30 pm

not all of them, just some.
I only downloaded them yesterday. I opened a couple with notepad++ and took out all the "[" and replace them with "(" and they still don't work. I give up. I think I will just work with the scripts and plugins that do work and stay away from the ones that don't. I am just getting too frustrated.
thanx guys for helping.
I will go through all the plugins that don't work and delete them from my plugin folder.....

Re: Getting errors on all my Python plugins

Fri Nov 19, 2010 1:03 pm

Not all the [] molly
only that with inside series of numbers

Re: Getting errors on all my Python plugins

Fri Nov 19, 2010 1:26 pm

O, I didn't know that.. Some of these have both ")]" So everything that has numbers like[000-22-111], they should be changed to "()"?
Image

Re: Getting errors on all my Python plugins

Fri Nov 19, 2010 3:40 pm

Yes Molly, every "gimp.set" command that has 3 series of numbers (these are numbers that represent colors in the cubic pattern py file) when you see [ ] , replace them with ( ), and change nothing else. This is for the cubic pattern file only.

Code:
def cubic_patterns(width, height, size, seamless):
   oldcolor = gimp.get_background()
   gimp.set_background([184,182,17])
   
   # Create new image
   img = gimp.Image(width, height, RGB)
   # Disable Undo
   img.undo_group_start()

   # Background Layer
   bg_layer = gimp.Layer(img, "Background", width, height, RGBA_IMAGE, 100, NORMAL_MODE)
   img.add_layer(bg_layer, 0)
   bg_layer.fill(BACKGROUND_FILL)

   layer = gimp.Layer(img, "Cubic Pattern", width, height, RGBA_IMAGE, 100, NORMAL_MODE)
   img.add_layer(layer, -1)
   pdb.gimp_image_set_active_layer(img, layer)
   draw = pdb.gimp_image_get_active_drawable(img)
   layer.fill(BACKGROUND_FILL)
   
   gimp.set_background([0,0,0])
   pdb.plug_in_cubism(img, layer, size, 1.6, 0)
   pdb.plug_in_edge(img, layer, 4, 0, 1)
   pdb.gimp_colorize(layer, 110, 80, 30)

Re: Getting errors on all my Python plugins

Fri Nov 19, 2010 4:20 pm

Wow, my last post went missing... I'll repeat what I said. On the pyingyang.py file that you have showing two posts above, the [0,0,0] and [255,255,255] both need to be changed to (0,0,0) and (255,255,255) along with the gimp.set brackets (the same as with cubicpattern.py)

Re: Getting errors on all my Python plugins

Sat Nov 20, 2010 6:11 am

thanx mahvin. I was able to fix the pattern cubic.py and it works but I don't know how to get anything except a green background pattern with it. I changed my colors and tried a bunch of things but I still get just the green BG when I run the script.

As far as the brush plug-in, I still get the error that it can't be found in brushes..... I guess I will have to give up on that one. (I still know know why the error would say that when it isn't in the brush folder, it is in the plug-in one.

Re: Getting errors on all my Python plugins

Sat Nov 20, 2010 6:18 am

Molly:

That's because the colors are hard coded into the plug-in. When I learn more Python in the future, I'll try and add color option menus to it. No promises, but I will try.

Re: Getting errors on all my Python plugins

Sat Nov 20, 2010 6:26 am

ok thanx mahvin. I just did one with the cubic and I changed the mode to grain extract, this is what I got.Image

Re: Getting errors on all my Python plugins

Sat Nov 20, 2010 6:30 am

I know I asked this yesterday, but did you check your plug-ins folder to see if phrase_brush.py was in there, as well as Win7-64phrase_brush.py? Because if both are in the folder, it will not work correctly. Remove the phrase_brush.py if it's there.

Re: Getting errors on all my Python plugins

Sat Nov 20, 2010 6:31 am

Try running cubic patterns, duplicate the layer, then change top layer mode to difference and flip it horizontally. Then change the background layer using Bucket fill, and different colors.

Re: Getting errors on all my Python plugins

Sat Nov 20, 2010 7:56 am

mahvin wrote:I know I asked this yesterday, but did you check your plug-ins folder to see if phrase_brush.py was in there, as well as Win7-64phrase_brush.py? Because if both are in the folder, it will not work correctly. Remove the phrase_brush.py if it's there.

Yes mahvin, I did check the plugin folder. there is only ONE phrase brush in there.....I know it won't work with two plug-ins or scripts of the same name and ex......

Re: Getting errors on all my Python plugins

Sat Nov 20, 2010 8:04 am

mahvin wrote:Try running cubic patterns, duplicate the layer, then change top layer mode to difference and flip it horizontally. Then change the background layer using Bucket fill, and different colors.


COOL.... what did the flip to horizontal do?

Image

Image

Re: Getting errors on all my Python plugins

Sat Nov 20, 2010 8:09 am

When you duplicate layers, the same pattern remains, unless you flip it. It just overlays the layers so they aren't in the same placement.

Re: Getting errors on all my Python plugins

Sat Nov 20, 2010 8:50 am

thanks... good to know
Post a reply