Quantcast
Channel: Forums - Python
Viewing all articles
Browse latest Browse all 2485

"\\" not parsed correctly

$
0
0
Using ArcGIS Desktop 10.1

A script call to CreatePersonalGDB passing the following parameters:
as the folder name:
"c:\\data1\\northdata"

as the mdb file name to create:
"north01"

causes error because the functions within CreatePersonalGDB parse the file name into u"\\north01 and then for some reason the "\n" gets interpreted as a control string and ta-da! an exception is raised!!

This occurs in both run mode and debug mode....
Of course, going through all code and changing "\\" to "/" solves the issue, but what happens at a future point when a different bug causes the "/" to do something unexpected? Or do we teach students to never name a database starting with an "n" or "t" or other possible control string character?

Is this a known issue, is it resolved at 10.2?

Bill D. Richards
Department of Geology/Geography
North Idaho College

Viewing all articles
Browse latest Browse all 2485

Trending Articles