Closed dlebauer closed 7 years ago
After downloading the database, I get the following
> db_load_tpl(x)
creating PostgreSQL database...
Error in postgresqlNewConnection(drv, ...) :
RS-DBI driver: (could not connect sacmac@local on dbname "sacmac"
)
thanks for the reports, right, ran into that curl problem elsewhere recently, I think write_disk
used to create the dir if not present, but we will just do it manually. looks like db_load_tpl
has my machine's name by default, will look into that
@dlebauer can you try agagin after reinstalling devtools::install_github("ropenscilabs/taxizedb")
That fixes the issue with the .taxize_local
directory, but I still get an error with the db_load_tpl
function, and I tried:
db_load_tpl(x, user = 'dlebauer')
db_load_tpl(x, user = 'testuser', pwd = 'testpwd')
db_load_tpl(x, user = 'dlebauer', verbose = TRUE) creating PostgreSQL database... Error in postgresqlNewConnection(drv, ...) : RS-DBI driver: (could not connect dlebauer@local on dbname "dlebauer" )
db_load_tpl(x) creating PostgreSQL database... Error in postgresqlNewConnection(drv, ...) : user argument cannot be NULL
Where either of the following works:
psql -U dlebauer
psql -U testuser -p
... looks to like it may be re-using the username as the dbname ... wouldn't it make sense for the dbname to be given a sensible default (e.g. tpl
in this case)?
that's weird, the dbname is hardcoded to be plantlist
, the code is https://github.com/ropenscilabs/taxizedb/blob/master/R/downloads.R#L123
maybe there is just a database connection problem?
you could manually try this on the command line https://github.com/ropenscilabs/taxizedb/blob/master/R/downloads.R#L124 that's the code to load the database into postgres - for me that's psql -U sacmac plantlist < /Users/sacmac/.taxize_local/plantlist.sql
When I try to follow the README, none of the
db_download_*
functions workThis worked after I created the directory
$HOME/.taxize_local
.dir.create("~/.taxize_local")
I'd submit a pull request, but would suspect that this could either be created on loading the library or on first running any of the download functions.