Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Troubleshooting Python plugin to load an XCF file
#5
(03-19-2021, 04:56 PM)Ofnuts Wrote: See the debug tips, in particular:

  1. Run the script in a terminal: python youscript.py. This won't run (ImportError: No module named gimpfu) but should report the more blatant syntax errors
  2. Add a big visible output line (print "***********************") at the top of your script
  3. Start Gimp in a terminal and
    • Check that you get the "*********************" line
    • Check for errors immediately after

This said, your plugin registers correctly for me and appears in the PDB and in the menus...

Code:
➤> [x for x in dir(pdb) if 'open_xcf' in x]
['python_fu_open_xcf']

This line ended up working in my script:
  • image = pdb.gimp_xcf_load(file, file)

This line I deleted: 
  • layer  = pdb.gimp_image_get_active_layer(image)

Thanks everyone. 
Reply


Messages In This Thread
RE: Troubleshooting Python plugin to load an XCF file - by TimorousMe - 03-21-2021, 03:36 AM

Forum Jump: