On Tue, Oct 30, 2018 at 9:41 PM Rich Shepard <[email protected]>
wrote:
>
>    I started grass7.7.svn (r73623) and set db.connect to use driver=pg and
> database='willamette_river_hg'. Then I copied the vector files (g.copy
> vect=current_file,current_file_pg) per the migration instructions on the
> databaseintro manual page.
>
>    Trying to run db.copy to add attribute tables to the database (except
for
> one that is already present) using a script with commands like this:
>
> db.copy from_driver=sqlite
from_database='$HOME/data/grassdata/willamette_basin/mercury/sqlite/sqlite.db'
from_table=all_species to_driver=pg to_database='willamette_river_hg'
to_table=all_species.pg
>
> (on a single line)
>
> this is the warning generated:
>
> WARNING: Unable to open database
>           <$HOME/data/grassdata/willamette_basin/mercury/sqlite/sqlite.db>
>           by driver <sqlite>
> dbmi: Protocol error
>
>    Yet, I can view the attribute table for the vector map within grass.
>
>    Should I run db.connect to the sqlite database at the top of the
script?

db.copy does not need db.connect. The reason for the error is that the
variable $HOME is not expanded because it is within single quotes. Use
double quotes instead of single quotes for the from_database argument and
it should work.

Markus M
>
> Rich
>
> _______________________________________________
> grass-user mailing list
> [email protected]
> https://lists.osgeo.org/mailman/listinfo/grass-user
_______________________________________________
grass-user mailing list
[email protected]
https://lists.osgeo.org/mailman/listinfo/grass-user

Reply via email to