Opened 14 years ago
Closed 12 years ago
#1301 closed defect (fixed)
wingrass: db.in.ogr fails to load .csv file
Reported by: | morrisxs09 | Owned by: | |
---|---|---|---|
Priority: | normal | Milestone: | 6.4.1 |
Component: | Database | Version: | svn-releasebranch64 |
Keywords: | wingrass | Cc: | |
CPU: | x86-32 | Platform: | MSWindows XP |
Description
db.in.ogr fails to load .csv file and returns with the following message...
db.in.ogr dsn=D:\Data\ProjData\GRASS_db\dmp_lg.csv output=test ERROR: Input table <D:DataProjDataGRASS_dbdmp_lg.csv> not found or not readable
GRASS_INFO_ERROR(5020,1): Unable to open data source <D:DataProjDataGRASS_dbdmp_lg.csv>
Workaround Replace pathname "\" with "/" then .csv load works
Change History (7)
comment:1 by , 14 years ago
Keywords: | wingrass added |
---|
follow-up: 3 comment:2 by , 14 years ago
I'm using the winGRASS gui i.e.
File > Import database table > Multiple import formats using OGR Window pops up
. On the "Required" tab, select "Browse" button on the "Table file to be imported or DB connection string" to navigate to .csv file and select required file to load.
. Enter any other required fields on the other tabs
. Press "Run"
error occurs
Are you suggesting quotes have to be added after the "Table file to be imported or DB connection string" field is populated?
comment:3 by , 14 years ago
Component: | Database → wxGUI |
---|
Replying to morrisxs09:
Are you suggesting quotes have to be added after the "Table file to be imported or DB connection string" field is populated?
try it. if that makes it work, then yes.
if so, the root of the problem is that the path strings are not getting quoted automatically by the file-picker?
Hamish
comment:4 by , 14 years ago
Tried it twice in the GUI, once with single quotes and once with double quotes and both failed with same issue.
comment:5 by , 14 years ago
comment:6 by , 14 years ago
Component: | wxGUI → Database |
---|
comment:7 by , 12 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
No more remarks, hence closing as fixed. Reopen if needed.
"\" is used as the quoting character, this is often used to deal with path names with spaces, instead of breaking the path into two command line args (otherwise it would not know where dsn= ended and the next option [in this case one called output=] began). to get a literal "\" you either need to quote it (with itself) like "
" or put the whole thing in "double quotes". for example:
dir=C:\\Program\ Files\\
or `dir="C:\Program Files\"So the computer sees "D:\Data" with a literal "D", and it becomes translated to "D:Data".
Solution: always "quote" filenames, or use the "/" workaround.
Hamish