What's new
Photoshop Gurus Forum

Welcome to Photoshop Gurus forum. Register a free account today to become a member! It's completely free. Once signed in, you'll enjoy an ad-free experience and be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

Variable Troubles - Relative Path not importing


James Pyle

Member
Messages
18
Likes
1
So I have huge datasets that have 10 or so variables. I use the same file for batching every data set and have had NO issues tonight so far. Now randomly when I import my CSV file just ONE of the images is not importing the relative path.

Most of my variables are text but I have 3 images and 2 of them import the relative path (where my CSV file is) but the other doesn't for no reason at all. Therefore the batch fails.

If I manually pick the proper image it works but that can't be done because my datsets are thousands of lines.

Really frustrated and cannot figure out why it won't import just one image. There are no special characters on this line/cell. It doesn't happen only on lines with special characters.

I do have some lines with apostophes in my CSV files but the error doesn't happen on this and in fact mostly everything works just a few random datset lines the one image won't work.


Things I tried:

Moving my files to other drives, with no nested folders.
I removed ALL lines from my CSV file except one of the lines causing the error, it still errored so it's definitely specific line related.

I am attaching csv with the one line (one that errors)

View attachment testbatch.rar

This file has a line with apostophes but on my end I removed those and it still errors. Here's a picture of the image that doesn't work, that doesn't import a path as it should:

ftSItTSh.jpg


Lastly, yes the image is there. But the error ALWAYS happens on a line with this "1 Player.png" even though my file is there..since the path is wrong it won't work. If I hit "Select" and choose the same file "1 Player.png" then it adds the path in and works fine.


Edit:

Okay I found the problem but I need help understanding it, and how to fix it.

All of the lines that say "Player 1" look right visually but I found out by doing a Search in the document for "Player 1" that none were found. So I determined theres something wrong with those cells. I retyped one of them manually, then copy and pasted it over several of the lines that had the broken "Player 1" in them...then I tried again search and it found them, then tried my batch and it found them.

So...how can these say "Player 1" and not actually be "Player 1" How can I fix this? I tried search and replace but since it can't even see them it can't replace them.

I tried copying the whole columna dn pasting values but it still doesn't see them as saying "Player 1" The only way I can fix is to manually type Player 1 there..makes no sense. (see attached file try to search for "1 Player"

Here you can see the issue, I did conditional formatting to make any line named "1 Player" red..and any line not "1 Player" green. You can see all the lines "1 Player" at the bottom that show green saying they aren't recognized.. If I click in one of those boxes and just retype "1 Player" then the color changes.

Edit 3:

Well, I fixed it by copying that column into notepad++ then back into excel. I wish I knew WHAT was causing this...2 hours on this and I had never seen anything like this before..makes no sense.
 
Last edited:
Does your excel have auto correction on ? I would try t writ a program ( I would in C but I guess whatever works ) to read the file and output ASII codes of characters, the space may be from upper half of ASCII table.

Edit : Do you have to use excel ? I think it would be much easier in notepad.

BTW it is ASCII #160, I have imported part of it into database ( the easiest for me ) and code

declare @i int
select @i=0
while @i < 10
begin
select @i = @i + 1
select (substring( c, @i, 1 )), ascii(substring( c, @i, 1 )) from aaa
end


gave me

- -----------
1 49

- -----------
  160

- -----------

P 80

- -----------
l 108

- -----------
a 97

- -----------
y 121


- -----------
e 101

- -----------
r 114

- -----------
, 44

- -----------

2 50
 
Last edited:
I don't HAVE to use excel, the files come from Open Office originally and I load them in Excel and save to CSV.

The problem has now come up again and I can't even seem to fix it.

I can't use notpad though because there are like 10 columns. Maybe the problem happens when I load the Open doc file into excel? I use Excel because there are several fomulas I have to have in the file. not sure about autocorrection I will have to check

This time nothing will solve it.. No matter it says in my cells "1-2 Players" or "1-4 Players" but excel doesn't see it. I pasted in notepad and back but that did not fix it this time. I am getting so frustrated.

I tried saving in TXT file and using search in there the text is found..but it still doesn't work in excel or photoshop. I have no idea what is happened it's like some incorrect data is being stored in those cells or something.
 
Last edited:
OK, I see. I would definitely create some trivial C program, just to filter the wrong characters. Like get c; while not EOF do; if c == 160 put 32; if c == XX1put XX2; else put c; get c; done. I cannot do it for you since I do not have C compiler for windows, I do all such stuff on Solaris virtual.

What about opening the file in notepad, saving and using ? I think notepad does not work with upper part of ASCII table.

The question Is whether just that 160 instead of 32 is a problem or some others too.
 
Here is a Photoshop script that should clean your CSV file, it will prompt for the CSV file then write out a cleaned version with a suffix of Fixed
 

Attachments


Back
Top