[GRASS-dev] Problem v.in.ascii (GRASS6.4.0RC4)

v.in.ascii -z input=fle_input output=name_output format=point fs= skip=0 x=1 y=2 z=3 cat=0 --overwrite --quiet

Output:


Segmentation fault
dbmi: Protocol error


Grass import correctly the points, but don’t create the associated table. anyone know the reason?

Roberto


Please consider the environment before printing this mail note!

I add some informations…

  • operating system: ubuntu 9.04
  • GRASS version: grass 6.4.0RC4

R

---------- Forwarded message ----------
From: roberto marzocchi <roberto.marzocchi@gmail.com>
Date: 2009/5/5
Subject: Problem v.in.ascii (GRASS6.4.0RC4)
To: grass-dev@lists.osgeo.org

v.in.ascii -z input=fle_input output=name_output format=point fs= skip=0 x=1 y=2 z=3 cat=0 --overwrite --quiet

Output:


Segmentation fault
dbmi: Protocol error


Grass import correctly the points, but don’t create the associated table. anyone know the reason?

Roberto


Please consider the environment before printing this mail note!

On 05/05/09 14:07, roberto marzocchi wrote:

v.in.ascii -z input=fle_input output=name_output format=point fs= skip=0 x=1 y=2 z=3 cat=0 --overwrite --quiet

Output:
******************************************************
Segmentation fault
dbmi: Protocol error
******************************************************

Grass import correctly the points, but don't create the associated table. anyone know the reason?

Is there any attribute data contained in the input file ? It would help if you sent us at least the first few lines of the data.

Also fs= seems weird. What is the field separator in the file ?

Moritz

in attached the input file

in grass6.3.0 the command run, the problem is only with the last grass version

R

2009/5/5 Moritz Lennert <mlennert@club.worldonline.be>

On 05/05/09 14:07, roberto marzocchi wrote:

v.in.ascii -z input=fle_input output=name_output format=point fs= skip=0 x=1 y=2 z=3 cat=0 --overwrite --quiet

Output:


Segmentation fault
dbmi: Protocol error


Grass import correctly the points, but don’t create the associated table. anyone know the reason?

Is there any attribute data contained in the input file ? It would help if you sent us at least the first few lines of the data.

Also fs= seems weird. What is the field separator in the file ?

Moritz

Please consider the environment before printing this mail note!

(attachments)

profilo_30.txt (3.69 KB)

On 05/05/09 17:45, roberto marzocchi wrote:

in attached the input file

in grass6.3.0 the command run, the problem is only with the last grass version

Have you tried quoting the fs, i.e.:

v.in.ascii -z input=fle_input output=name_output format=point fs=' ' skip=0 x=1 y=2 z=3 cat=0 --overwrite

Running it without quoting, I get:

ERROR: y column number > minimum last column number
        (incorrect field separator?)

With quoting it works (in the grass6 development branch).

How are you running this command ? On the command line ? In the GUI ?

Moritz

R

2009/5/5 Moritz Lennert <mlennert@club.worldonline.be <mailto:mlennert@club.worldonline.be>>

    On 05/05/09 14:07, roberto marzocchi wrote:

        v.in.ascii -z input=fle_input output=name_output format=point
        fs= skip=0 x=1 y=2 z=3 cat=0 --overwrite --quiet

        Output:
        ******************************************************
        Segmentation fault
        dbmi: Protocol error
        ******************************************************

        Grass import correctly the points, but don't create the
        associated table. anyone know the reason?

    Is there any attribute data contained in the input file ? It would
    help if you sent us at least the first few lines of the data.

    Also fs= seems weird. What is the field separator in the file ?

    Moritz

Please consider the environment before printing this mail note!

I have the same problem in the command line (using fs=' ') and using the GUI without quoting
maybe i have a problem with libraries....?

R

Moritz Lennert ha scritto:

On 05/05/09 17:45, roberto marzocchi wrote:

in attached the input file

in grass6.3.0 the command run, the problem is only with the last grass version

Have you tried quoting the fs, i.e.:

v.in.ascii -z input=fle_input output=name_output format=point fs=' ' skip=0 x=1 y=2 z=3 cat=0 --overwrite

Running it without quoting, I get:

ERROR: y column number > minimum last column number
       (incorrect field separator?)

With quoting it works (in the grass6 development branch).

How are you running this command ? On the command line ? In the GUI ?

Moritz

R

2009/5/5 Moritz Lennert <mlennert@club.worldonline.be <mailto:mlennert@club.worldonline.be>>

    On 05/05/09 14:07, roberto marzocchi wrote:

        v.in.ascii -z input=fle_input output=name_output format=point
        fs= skip=0 x=1 y=2 z=3 cat=0 --overwrite --quiet

        Output:
        ******************************************************
        Segmentation fault
        dbmi: Protocol error
        ******************************************************

        Grass import correctly the points, but don't create the
        associated table. anyone know the reason?

    Is there any attribute data contained in the input file ? It would
    help if you sent us at least the first few lines of the data.

    Also fs= seems weird. What is the field separator in the file ?

    Moritz

Please consider the environment before printing this mail note!

Hi Roberto,

I can reproduce the problem:

GRASS 6.5.svn (spearfish60):/tmp > v.in.ascii -z input=profilo_30.txt
output=name_output format=point fs=" " skip=0 x=1 y=2 z=3 cat=0
Scanning input for column types...
Maximum input row length: 35
Maximum number of columns: 10
Minimum number of columns: 4
Importing points...
100%
Populating table...
dbmi: Protocol error
...

No good.

GRASS 6.5.svn (spearfish60):/tmp > g.gisenv set=DEBUG=3

GRASS 6.5.svn (spearfish60):/tmp > v.in.ascii -z input=profilo_30.txt
output=name_output format=point fs=" " skip=0 x=1 y=2 z=3 cat=0 --o
D2/3: Vect_open_new(): name = name_output
...
D2/3: load_table_head(): tab = 30,
/home/neteler/grassdata/spearfish60/neteler/dbf//name_output.dbf
D3/3: Doing SQL command <3> on DBF table... (see include/sqlp.h)
D2/3: load_table(): tab = 30
100%
Populating table...
D2/3: Commit transaction
...
D2/3: save_table 27
D2/3: save_table 28
D2/3: save_table 29
D2/3: save_table 30
D2/3: Write table to tempfile:
'/home/neteler/grassdata/spearfish60/neteler/.tmp/host550/17010.dbf'
D2/3: Write 108 rows
dbmi: Protocol error
D3/3: Vect_build(): build = 4
Building topology for vector map <name_output>
...

The file /home/neteler/grassdata/spearfish60/neteler/.tmp/host550/17010.dbf
is only of
1 byte size, so corrupted.

Using the SQLite driver, I get a more useful error message:

DBMI-SQLite driver error:
Error in sqlite3_prepare():
table name_output has 11 columns but 10 values were supplied
D2/3: G__home home = /home/neteler
ERROR: Unable to insert new record: insert into name_output values ( 1,
       715514.14, 93561.67, 304.19, '53', null, null, null, null, null)

As we see: 5 empty columns are recognized.
This is because there are white spaces at the end of the first row,
maybe elsewhere, too.

So: GRASS is working but the error trapping in the DBF driver isn't
that good (the SQLite driver is better here).

Solution: polish the data file...

Markus
PS: the * in some rows will also cause problems.

On Tue, May 5, 2009 at 10:55 PM, roberto.marzocchi
<roberto.marzocchi@gmail.com> wrote:

I have the same problem in the command line (using fs=' ') and using the
GUI without quoting
maybe i have a problem with libraries....?

R

Moritz Lennert ha scritto:

On 05/05/09 17:45, roberto marzocchi wrote:

in attached the input file

in grass6.3.0 the command run, the problem is only with the last grass
version

Have you tried quoting the fs, i.e.:

v.in.ascii -z input=fle_input output=name_output format=point fs=' '
skip=0 x=1 y=2 z=3 cat=0 --overwrite

Running it without quoting, I get:

ERROR: y column number > minimum last column number
(incorrect field separator?)

With quoting it works (in the grass6 development branch).

How are you running this command ? On the command line ? In the GUI ?

Moritz

R

2009/5/5 Moritz Lennert <mlennert@club.worldonline.be
<mailto:mlennert@club.worldonline.be>>

On 05/05/09 14:07, roberto marzocchi wrote:

   v\.in\.ascii \-z input=fle\_input  output=name\_output format=point
   fs=  skip=0 x=1 y=2 z=3 cat=0 \-\-overwrite \-\-quiet

   Output:
   \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
   Segmentation fault
   dbmi: Protocol error
   \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*

   Grass import correctly the points, but don&#39;t create the
   associated table\. anyone know the reason?

Is there any attribute data contained in the input file ? It would
help if you sent us at least the first few lines of the data.

Also fs= seems weird. What is the field separator in the file ?

Moritz

Please consider the environment before printing this mail note!

_______________________________________________
grass-dev mailing list
grass-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-dev

Ok, without white space the command run correctly.
Grass 6.4 and 6.5 “don’t like” white space in a character string.
No problem with * character!

Many thanks

Roberto

2009/5/5 Markus Neteler <neteler@osgeo.org>

Hi Roberto,

I can reproduce the problem:

GRASS 6.5.svn (spearfish60):/tmp > v.in.ascii -z input=profilo_30.txt

output=name_output format=point fs=" " skip=0 x=1 y=2 z=3 cat=0

Scanning input for column types…
Maximum input row length: 35
Maximum number of columns: 10
Minimum number of columns: 4
Importing points…
100%
Populating table…
dbmi: Protocol error

No good.

GRASS 6.5.svn (spearfish60):/tmp > g.gisenv set=DEBUG=3

GRASS 6.5.svn (spearfish60):/tmp > v.in.ascii -z input=profilo_30.txt

output=name_output format=point fs=" " skip=0 x=1 y=2 z=3 cat=0 --o

D2/3: Vect_open_new(): name = name_output

D2/3: load_table_head(): tab = 30,
/home/neteler/grassdata/spearfish60/neteler/dbf//name_output.dbf
D3/3: Doing SQL command <3> on DBF table… (see include/sqlp.h)
D2/3: load_table(): tab = 30
100%
Populating table…
D2/3: Commit transaction

D2/3: save_table 27
D2/3: save_table 28
D2/3: save_table 29
D2/3: save_table 30
D2/3: Write table to tempfile:
‘/home/neteler/grassdata/spearfish60/neteler/.tmp/host550/17010.dbf’
D2/3: Write 108 rows
dbmi: Protocol error
D3/3: Vect_build(): build = 4
Building topology for vector map <name_output>

The file /home/neteler/grassdata/spearfish60/neteler/.tmp/host550/17010.dbf
is only of
1 byte size, so corrupted.

Using the SQLite driver, I get a more useful error message:

DBMI-SQLite driver error:
Error in sqlite3_prepare():
table name_output has 11 columns but 10 values were supplied
D2/3: G__home home = /home/neteler
ERROR: Unable to insert new record: insert into name_output values ( 1,
715514.14, 93561.67, 304.19, ‘53’, null, null, null, null, null)

As we see: 5 empty columns are recognized.
This is because there are white spaces at the end of the first row,
maybe elsewhere, too.

So: GRASS is working but the error trapping in the DBF driver isn’t
that good (the SQLite driver is better here).

Solution: polish the data file…

Markus
PS: the * in some rows will also cause problems.

On Tue, May 5, 2009 at 10:55 PM, roberto.marzocchi

<roberto.marzocchi@gmail.com> wrote:

I have the same problem in the command line (using fs=’ ') and using the
GUI without quoting
maybe i have a problem with libraries…?

R

Moritz Lennert ha scritto:

On 05/05/09 17:45, roberto marzocchi wrote:

in attached the input file

in grass6.3.0 the command run, the problem is only with the last grass
version

Have you tried quoting the fs, i.e.:

v.in.ascii -z input=fle_input output=name_output format=point fs=’ ’
skip=0 x=1 y=2 z=3 cat=0 --overwrite

Running it without quoting, I get:

ERROR: y column number > minimum last column number
(incorrect field separator?)

With quoting it works (in the grass6 development branch).

How are you running this command ? On the command line ? In the GUI ?

Moritz

R

2009/5/5 Moritz Lennert <mlennert@club.worldonline.be
mailto:[mlennert@club.worldonline.be](mailto:mlennert@club.worldonline.be)>

On 05/05/09 14:07, roberto marzocchi wrote:

v.in.ascii -z input=fle_input output=name_output format=point
fs= skip=0 x=1 y=2 z=3 cat=0 --overwrite --quiet

Output:


Segmentation fault
dbmi: Protocol error


Grass import correctly the points, but don’t create the
associated table. anyone know the reason?

Is there any attribute data contained in the input file ? It would
help if you sent us at least the first few lines of the data.

Also fs= seems weird. What is the field separator in the file ?

Moritz

Please consider the environment before printing this mail note!


grass-dev mailing list
grass-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-dev


Roberto Marzocchi
SUPSI-Istituto scienze della terra -Institute of Earth Sciences
Via Trevano C.P. 72 6952 Canobbio Switzerland
Phone: +41 58 6666 212
Fax: +41 58 6666 209

E-mail: roberto.marzocchi@supsi.ch
Internet: www.ist.supsi.ch

Please consider the environment before printing this mail note!

On Wed, May 6, 2009 at 9:02 AM, roberto marzocchi
<roberto.marzocchi@gmail.com> wrote:

Ok, without white space the command run correctly.
Grass 6.4 and 6.5 "don't like" white space in a character string.

No, it is slightly different: Of course you can have white space in
strings. But in your case, you have white space as separator at
the same moment - obviously creating a conflict.

No problem with * character!

sure - I just thought that you wanted to import the number column
as numbers not as chars.

Cheers
Markus