Opened 12 years ago

Closed 12 years ago

#1648 closed defect (fixed)

GRASS7: db.in.ogr crash

Reported by: neteler Owned by: grass-dev@…
Priority: normal Milestone: 7.0.0
Component: Database Version: svn-trunk
Keywords: Cc:
CPU: Unspecified Platform: Unspecified

Description

The key parameter fails:

db.in.ogr dsn=/home/top4095/data/bodenproben.csv key=cat
Spaltenname wurde geändert: 'ID' -> 'o__ID'
Breite für die Spalte o__ID wird auf 255 gesetzt (wurde nicht von OGR bestimmt). Einige Texte können abgeschnitten worden sein!
Breite für die Spalte east wird auf 255 gesetzt (wurde nicht von OGR bestimmt). Einige Texte können abgeschnitten worden sein!
Breite für die Spalte north wird auf 255 gesetzt (wurde nicht von OGR bestimmt). Einige Texte können abgeschnitten worden sein!
Breite für die Spalte height wird auf 255 gesetzt (wurde nicht von OGR bestimmt). Einige Texte können abgeschnitten worden sein!
105 features ohne Geometrie.
Traceback (most recent call last):
  File "/home/top4095/software/grass7_svn/dist.i686-pc-
linux-gnu/scripts/db.in.ogr", line 125, in <module>
    main()
  File "/home/top4095/software/grass7_svn/dist.i686-pc-
linux-gnu/scripts/db.in.ogr", line 102, in main
    stdin = "ALTER TABLE %s ADD COLUMN %s integer" %
(output, key) )
  File "/home/top4095/software/grass7_svn/dist.i686-pc-
linux-gnu/etc/python/grass/script/core.py", line 187, in
run_command
    ps = start_command(*args, **kwargs)
  File "/home/top4095/software/grass7_svn/dist.i686-pc-
linux-gnu/etc/python/grass/script/core.py", line 175, in
start_command
    return Popen(args, **popts)
  File "/home/top4095/software/grass7_svn/dist.i686-pc-
linux-gnu/etc/python/grass/script/core.py", line 56, in
__init__
    startupinfo, creationflags)
  File "/usr/lib/python2.7/subprocess.py", line 672, in
__init__
    errread, errwrite) = self._get_handles(stdin, stdout,
stderr)
  File "/usr/lib/python2.7/subprocess.py", line 1040, in
_get_handles
    p2cread = stdin.fileno()
AttributeError: 'str' object has no attribute 'fileno'
(Fri Apr 27 14:50:26 2012) Befehl ausgeführt (0 sec)

Sidenote:

I tried to re-import a CSV file and found that db.in.ogr is lacking the --overwrite flag (would then be a call to db.droptable -f table)

Change History (1)

comment:1 by neteler, 12 years ago

Resolution: fixed
Status: newclosed

Fixed in r51558.

Note: See TracTickets for help on using tickets.