Illegal Character

When I run a specific set of code, I get back the full 10,744 records. When a colleague runs the same code, they only get back 6,144 records and then an error for "Lookup Error - Illegal Characters in path.". I look at record #6,145 and there is nothing in it that should be causing this error. Does anyone know what could cause one person to get this, but not the other? We've compared settings and nothing is jumping out either.