Results 1 to 8 of 8

Thread: GIMP Invalid Syntax Error - Problems with image Filepath?

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Administrator Redrobes's Avatar
    Join Date
    Dec 2007
    Location
    England
    Posts
    7,221
    Blog Entries
    8

    Default

    You could put some quotes around it. Try normal double quotes " and then try single quotes ' if that doesnt work.

    Given that is claiming a syntax error that implies its not trying to read that as a string but a command. So I bet that its just that its not quoted to make it string. When a language says something like "<input>" it means replace the <input> bit with the filename but its saying that you need double quotes around that to make it "<input>".

    One thing you also need to know is that windows directory separator is a \ but linux-unix is /.

    But in most languages the backslash is treated as a special character that means make the next character a control code. So \n is the newline character. When quoting with double quotes the backslashes mean convert character but with single quotes it usually means take what you have between them literally. So a backslash means a backslash. So you may find that even tho it reckoned you should have double quotes around it you might find single ones work better in this case.

    If it is the case that only double quotes are allowed and it doesnt like the back slashes then for every time you have a backslash then try making it a pair of backslashes. This is because in most languages the special control code of \\ is itself backslash so that you are able to specify one if you have to. I.e. it could be that you need to put

    climate_generator( "D:\\Documents\\Legendarium\\ ... etc " )

    And... you might find that the spaces in the filename need a backslash. I.e. when it says "World Map" you put in "World\ Map".

    Try a selection of those hints. Python will probably do the whole thing correctly with a set of single ' quotes ' .
    Last edited by Redrobes; 10-26-2020 at 01:29 PM.

  2. #2

    Default

    Doing so (both with and without the .xcf in case that mattered) resulted in a "wrong parameter type" error.

    Inputs:
    pdb.python_fu_climate_generator("D:\Documents\Lege ndarium\Map\World Map (v2)\suru backup.xcf")
    pdb.python_fu_climate_generator('D:\Documents\Lege ndarium\Map\World Map (v2)\suru backup.xcf')
    pdb.python_fu_climate_generator("D:\Documents\Lege ndarium\Map\World Map (v2)\suru backup")
    pdb.python_fu_climate_generator('D:\Documents\Lege ndarium\Map\World Map (v2)\suru backup')

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •