Messie, thank you for taking the time to respond and think about the problem. I sincerely appreciate it.
Can you please clarify what you mean by dots in path names being bad? On Linux they are allowed and I haven't had any problems with them sans this script we are/'were?' testing.
I've tested the other script from vk and it doesn't appear to run at all.
In any case, thanks again for all the help and effort you've put into this script. :)
After trying this again using the ~/temp directory, there were no error messages and insanebump worked as expected.
Remaining questions: 1.) Is there anything that can be done in the insanebump script to help fix the path naming problem? 2.) Is the weird thing that Gimp is doing by placing a "_d" before every "." in the path and file names a bug in Gimp? It would be strange if this was a bug because a lot of my other files have "." in the file name and path and all the other functions I've used in Gimp including scripts/plug-ins seem to be working fine with that "." condition present. That being true, how could I bug test this further to see why this "_d" thing is happening?
I'm reposting this message because its not showing up on the forums after waiting 30 minutes.
Hi Messie,
Thank you for taking the time to respond to the problem. I implemented your request and I think we have some new insight to the problem with the latest error message.
Steps to reproduce the problem: 1.) I renamed the file I was working on to "image.png".
2.) I started over by deleting the insanebump.py file I had originally downloaded and downloaded a fresh copy and marked it executable without changing the path function:
The function in the file is shown above for reference.
3.) I started gimp 2.8.6 and opened image.png, then did: Filters --> Map --> insane...
...and got the following error messages:
-------- 1st error message begins -------- GIMP Message Calling error for procedure 'gimp-file-save': Could not open '~/Archives/Projects_d.Media_d.Blender/Textures/Dirt/image_d.png' for writing: No such file or directory -------- 1st error message ends --------
Not I replaced "home/myusername" with "~" in the above error message, also note that everywhere you see a "_d" in the path shown there is no such character in the actual path. Here is the actual path to the file again with "home/myusername" with "~" for brevity:
As you can see, there is no such "_d" in this path to the file nor in the file name itself. So this is something either Gimp or the plug-in did on its own, but more likely it was Gimp since the error message window title displayed was "Gimp Message". The following error message was immediately displayed along side the 1st error message shown above.
-------- 2nd error message begins -------- An error occurred running python-fu-InsaneBump RuntimeError: Could not open '/home/sysop/Archives/Projects_d.Media_d.Blender/Textures/Dirt/image_d.png' for writing: No such file or directory More Information Traceback (most recent call last): File "/usr/lib/gimp/2.0/python/gimpfu.py", line 699, in response dialog.res = run_script(params) File "/usr/lib/gimp/2.0/python/gimpfu.py", line 361, in run_script return apply(function, params) File "/home/sysop/.gimp-2.8/plug-ins/InsaneBump.py", line 198, in batchnr pdb.gimp_file_save(image, diffuse, getFilename(file_name, "_d"), getFilename(file_name, "_d")) RuntimeError: Could not open '/home/sysop/Archives/Projects_d.Media_d.Blender/Textures/Dirt/image_d.png' for writing: No such file or directory -------- 2nd error message ends --------
After doing the same steps shown above but replacing the path shown in the getPrevPath function of step 2 above, such that the new function now looks something like this:
...(where "myusername" is obviously not what was used but instead used my real username) we get the same exact error messages displayed in the 1st and 2nd error messages listed above.
Questions: 1.) Am I being to thorough with my responses? TMI? 2.) Is there anything that can be done in the insanebump script to help fix this problem? 3.) Is the weird thing that Gimp is doing by placing a "_d" before every "." in the path and file names a bug in Gimp? If so then I will need to find some other scripts that can cause this bug to happen, and optionally some other people who can reproduce this bug before I can file a bug report.
Something I will try and report back on: I will put "image.png" in ~/temp and try to run insanebump again to see if this makes any difference.
My system specs: OS: Ubuntu 12.04, Gnome3 desktop. Relevant Software: Gimp v2.8.6 Relevant Plugin: InsaneBump (unknown version since its not listed on its webpage)
Description of problem: 1.) I loaded the insane bump script from here: http://registry.gimp.org/node/28117 ...into a fresh install of Gimp v2.8.6, with a fresh config directory (~/.gimp-2.8) rebuilt by gimp 2.8.6 when it was first installed.
2.) I then placed the script (from the address shown in step 1 above) into the suggested (~/.gimp-2.8/plug-ins) directory and marked the python script as executable as instructed.
3.) I opened the script with an editor and fixed the windows based hard coded path to a hard coded path that pointed to the plug-in directory for gimp v2.8.6 in Unbutnu 12.04 (which is located in [~/.gimp-2.8/plug-ins]). I'm not a programmer so I didn't know how to set this directory via some coded auto-detection method as mentioned in an earlier comment, and didn't want to try it since it was more work than it was worth to look up what each part of all that python code meant.
4.) I fired up gimp, loaded a single layered image, went to "Filters --> Maps -- Insane..." and got the following error message:
-------- Error Message Begins -------- An error occurred running python-fu-InsaneBump AttributeError: 'NoneType' object has no attribute 'replace' More information: Traceback (most recent call last): File "/usr/lib/gimp/2.0/python/gimpfu.py", line 699, in response dialog.res = run_script(params) File "/usr/lib/gimp/2.0/python/gimpfu.py", line 361, in run_script return apply(function, params) File "/home/sysop/.gimp-2.8/plug-ins/InsaneBump.py", line 198, in batchnr pdb.gimp_file_save(image, diffuse, getFilename(file_name, "_d"), getFilename(file_name, "_d")) File "/home/sysop/.gimp-2.8/plug-ins/InsaneBump.py", line 19, in getFilename filename = filename.replace(".", suffix + ".") AttributeError: 'NoneType' object has no attribute 'replace' -------- Error Message Ends --------
Questions: 1.) Can you please let us (this forum thread) know if vk's code from the previous post can be folded into you're work on updating the insanebump script.
2.) Am I missing any dependencies that might help this script run better?
3.) Is there any way you could help me troubleshoot this problem a bit? Note: I'm not a programmer in the sense that I can only read basic code and even then I have to look stuff up to understand it.
Comment: Thank you for working on this script and for keeping it up to date and relevant.
Messie, thank you for taking the time to respond and think about the problem. I sincerely appreciate it.
Can you please clarify what you mean by dots in path names being bad? On Linux they are allowed and I haven't had any problems with them sans this script we are/'were?' testing.
I've tested the other script from vk and it doesn't appear to run at all.
In any case, thanks again for all the help and effort you've put into this script. :)
[Update]
After trying this again using the ~/temp directory, there were no error messages and insanebump worked as expected.
Remaining questions:
1.) Is there anything that can be done in the insanebump script to help fix the path naming problem?
2.) Is the weird thing that Gimp is doing by placing a "_d" before every "." in the path and file names a bug in Gimp? It would be strange if this was a bug because a lot of my other files have "." in the file name and path and all the other functions I've used in Gimp including scripts/plug-ins seem to be working fine with that "." condition present. That being true, how could I bug test this further to see why this "_d" thing is happening?
I'm reposting this message because its not showing up on the forums after waiting 30 minutes.
Hi Messie,
Thank you for taking the time to respond to the problem. I implemented your request and I think we have some new insight to the problem with the latest error message.
Steps to reproduce the problem:
1.) I renamed the file I was working on to "image.png".
2.) I started over by deleting the insanebump.py file I had originally downloaded and downloaded a fresh copy and marked it executable without changing the path function:
def getPrevPath():
path = '"C:\Program Files\Insane Bump'
return path
The function in the file is shown above for reference.
3.) I started gimp 2.8.6 and opened image.png, then did:
Filters --> Map --> insane...
...and got the following error messages:
-------- 1st error message begins --------
GIMP Message
Calling error for procedure 'gimp-file-save':
Could not open '~/Archives/Projects_d.Media_d.Blender/Textures/Dirt/image_d.png' for writing: No such file or directory
-------- 1st error message ends --------
Not I replaced "home/myusername" with "~" in the above error message, also note that everywhere you see a "_d" in the path shown there is no such character in the actual path. Here is the actual path to the file again with "home/myusername" with "~" for brevity:
"~Archives/Projects.Media.Blender/Textures/Dirt/image.png"
As you can see, there is no such "_d" in this path to the file nor in the file name itself. So this is something either Gimp or the plug-in did on its own, but more likely it was Gimp since the error message window title displayed was "Gimp Message". The following error message was immediately displayed along side the 1st error message shown above.
-------- 2nd error message begins --------
An error occurred running python-fu-InsaneBump
RuntimeError: Could not open '/home/sysop/Archives/Projects_d.Media_d.Blender/Textures/Dirt/image_d.png' for writing: No such file or directory
More Information
Traceback (most recent call last):
File "/usr/lib/gimp/2.0/python/gimpfu.py", line 699, in response
dialog.res = run_script(params)
File "/usr/lib/gimp/2.0/python/gimpfu.py", line 361, in run_script
return apply(function, params)
File "/home/sysop/.gimp-2.8/plug-ins/InsaneBump.py", line 198, in batchnr
pdb.gimp_file_save(image, diffuse, getFilename(file_name, "_d"), getFilename(file_name, "_d"))
RuntimeError: Could not open '/home/sysop/Archives/Projects_d.Media_d.Blender/Textures/Dirt/image_d.png' for writing: No such file or directory
-------- 2nd error message ends --------
After doing the same steps shown above but replacing the path shown in the getPrevPath function of step 2 above, such that the new function now looks something like this:
def getPrevPath():
path = '/home/myusername/.gimp-2.8/plug-ins'
return path
...(where "myusername" is obviously not what was used but instead used my real username) we get the same exact error messages displayed in the 1st and 2nd error messages listed above.
Questions:
1.) Am I being to thorough with my responses? TMI?
2.) Is there anything that can be done in the insanebump script to help fix this problem?
3.) Is the weird thing that Gimp is doing by placing a "_d" before every "." in the path and file names a bug in Gimp? If so then I will need to find some other scripts that can cause this bug to happen, and optionally some other people who can reproduce this bug before I can file a bug report.
Something I will try and report back on:
I will put "image.png" in ~/temp and try to run insanebump again to see if this makes any difference.
For: messie
My system specs:
OS: Ubuntu 12.04, Gnome3 desktop.
Relevant Software: Gimp v2.8.6
Relevant Plugin: InsaneBump (unknown version since its not listed on its webpage)
Description of problem:
1.) I loaded the insane bump script from here:
http://registry.gimp.org/node/28117
...into a fresh install of Gimp v2.8.6, with a fresh config directory (~/.gimp-2.8) rebuilt by gimp 2.8.6 when it was first installed.
2.) I then placed the script (from the address shown in step 1 above) into the suggested (~/.gimp-2.8/plug-ins) directory and marked the python script as executable as instructed.
3.) I opened the script with an editor and fixed the windows based hard coded path to a hard coded path that pointed to the plug-in directory for gimp v2.8.6 in Unbutnu 12.04 (which is located in [~/.gimp-2.8/plug-ins]). I'm not a programmer so I didn't know how to set this directory via some coded auto-detection method as mentioned in an earlier comment, and didn't want to try it since it was more work than it was worth to look up what each part of all that python code meant.
4.) I fired up gimp, loaded a single layered image, went to "Filters --> Maps -- Insane..." and got the following error message:
-------- Error Message Begins --------
An error occurred running python-fu-InsaneBump
AttributeError: 'NoneType' object has no attribute 'replace'
More information:
Traceback (most recent call last):
File "/usr/lib/gimp/2.0/python/gimpfu.py", line 699, in response
dialog.res = run_script(params)
File "/usr/lib/gimp/2.0/python/gimpfu.py", line 361, in run_script
return apply(function, params)
File "/home/sysop/.gimp-2.8/plug-ins/InsaneBump.py", line 198, in batchnr
pdb.gimp_file_save(image, diffuse, getFilename(file_name, "_d"), getFilename(file_name, "_d"))
File "/home/sysop/.gimp-2.8/plug-ins/InsaneBump.py", line 19, in getFilename
filename = filename.replace(".", suffix + ".")
AttributeError: 'NoneType' object has no attribute 'replace'
-------- Error Message Ends --------
Questions:
1.) Can you please let us (this forum thread) know if vk's code from the previous post can be folded into you're work on updating the insanebump script.
2.) Am I missing any dependencies that might help this script run better?
3.) Is there any way you could help me troubleshoot this problem a bit? Note: I'm not a programmer in the sense that I can only read basic code and even then I have to look stuff up to understand it.
Comment:
Thank you for working on this script and for keeping it up to date and relevant.