Suite

Problème d'import CSV dans CartoDB


J'ai installé CartoDB sur ma machine locale et je ne peux pas télécharger de données via l'importation.

Données à télécharger

Latitude,Longitude,Nom 48.1,0.25,"Premier point" 49.2,1.1,"Deuxième point" 47.5,0.75,"Troisième point"

Je reçois l'erreur :

true : Importation de données depuis /tmp/imports/2051014-21811-1binquy/123.csv true : Charge d'importation basée sur fichier true : Encodage détecté ISO-8859-1 true : Utilisation de la connexion à la base de données avec {:adapter=>"postgres", :encoding=>"unicode", :host=>"localhost", :port=>5432, :database=>"cartodb_dev_user_f4f00efc-27e9-4321-af96-8bbb73245090_db", :username=>"postgres", :conn_validator_timeout=> 900, :pool=>50, :user=>"development_cartodb_user_f4f00efc-27e9-4321-af96-8bbb73245090"} false : appel ogr2ogr : OSM_USE_CUSTOM_INDEXING=NO PG_USE_COPY=YES PGCLIENTENCODING=ISO-8859-1 -f localhost port = 5432 user = development_cartodb_user_f4f00efc-27e9-4321-af96-8bbb73245090 dbname = cartodb_dev_user_f4f00efc-27e9-4321-af96-8bbb73245090_db password = 53e933beffd3aef71b99afe6586c9afca5804943development_cartodb_user_f4f00efc-27e9-4321-af96-8bbb73245090" -lco DIM = 2 -lco PRECISION = NO / tmp /imports/2051014-21811-1binquy/123.csv -nln cdb_importer.importer_e2b0c8ba726711e59e5400505681560b -nlt PROMOTE_TO_MULTI vrai : ogr2o gr sortie : sh : -f : commande introuvable true : ogr2ogr code de sortie : 32512 2015-10-14 11:37:03 UTC : Ogr2ogr ÉCHEC ! 2015-10-14 11:37:03 UTC: ogr2ogr.exit_code = 32512 2015-10-14 11:37:03 UTC: ogr2ogr.command = OSM_USE_CUSTOM_INDEXING=NO PG_USE_COPY=YES PGCLIENTENCODING=ISO-8859-1 -f PostgreSQL PG : "host = localhost port = 5432 user = development_cartodb_user_f4f00efc-27e9-4321-af96-8bbb73245090 dbname = cartodb_dev_user_f4f00efc-27e9-4321-af96-8bbb73245090_db password = 53e933beffd3aef71b99afe6586c9afca5804943development_cartodb_user_f4f00efc-27e9-4321-af96-8bbb73245090" -lco DIM = 2 -lco PRECISION =NO /tmp/imports/2051014-21811-1binquy/123.csv -nln cdb_importer.importer_e2b0c8ba726711e59e5400505681560b -nlt PROMOTE_TO_MULTI 2015-10-14 11:37:03 UTC : ogr2ogr.command -_: commande non trouvée : sh Erreur lors de l'importation des données depuis /tmp/imports/2051014-21811-1binquy/123.csv : ===LOG END=== true : --------------------- ------------------------------- false : ["/opt/openmap/carto/cartodb/services/importer/lib/ importer/loader.rb:335:in 'check_for_import_errors'", "/opt/openmap/carto/cartodb/services/importer/lib/impo rter/loader.rb:268:in 'run_ogr2ogr'", "/opt/openmap/carto/cartodb/services/importer/lib/importer/loader.rb:63:in 'block (2 level) in run'", "/opt/openmap/carto/cartodb/lib/cartodb/stats/aggregator.rb:97:in 'method_missing'", "/opt/openmap/carto/cartodb/services/importer/lib/importer/loader.rb : 62:in 'block in run'", "/opt/openmap/carto/cartodb/lib/cartodb/stats/aggregator.rb:97:in 'method_missing'", "/opt/openmap/carto/cartodb/services/ importer/lib/importer/loader.rb:52:in 'run'", "/opt/openmap/carto/cartodb/services/importer/lib/importer/runner.rb:222:in 'file_based_loader_run'", "/ opt/openmap/carto/cartodb/services/importer/lib/importer/runner.rb:177:in 'import'", "/opt/openmap/carto/cartodb/services/importer/lib/importer/runner.rb : 327:in 'execute_import'", "/opt/openmap/carto/cartodb/services/importer/lib/importer/runner.rb:256:in 'block (3 level) in single_resource_import'", "/opt/openmap/ carto/cartodb/services/importer/lib/importer/runner.rb:249:in 'each'", "/opt/openmap/carto/ca rtodb/services/importer/lib/importer/runner.rb:249:in 'each_with_index'", "/opt/openmap/carto/cartodb/services/importer/lib/importer/runner.rb:249:in 'block ( 2 niveaux) dans single_resource_import'", "/opt/openmap/carto/cartodb/lib/cartodb/stats/aggregator.rb:97:in 'method_missing'", "/opt/openmap/carto/cartodb/services/importer/ lib/importer/runner.rb:248:in 'block in single_resource_import'", "/opt/openmap/carto/cartodb/lib/cartodb/stats/aggregator.rb:97:in 'method_missing'", "/opt/ openmap/carto/cartodb/services/importer/lib/importer/runner.rb:226:in 'single_resource_import'", "/opt/openmap/carto/cartodb/services/importer/lib/importer/runner.rb:95 : dans 'run_import'", "/opt/openmap/carto/cartodb/services/importer/lib/importer/runner.rb:88:in 'block in run'", "/opt/openmap/carto/cartodb/lib/ cartodb/stats/aggregator.rb:97:in 'method_missing'", "/opt/openmap/carto/cartodb/services/importer/lib/importer/runner.rb:87:in 'run'", "/opt/ openmap/carto/cartodb/app/connectors/importer.rb:39:in 'run'", "/opt/openmap/carto/cartodb/app/models/data_import.rb:618:in 'new_importer'", "/opt/openmap/carto/cartodb/app/models/data_import.rb:354:in 'dispatch' ", "/opt/openmap/carto/cartodb/app/models/data_import.rb:163:in 'run_import!'", "/opt/openmap/carto/cartodb/lib/resque/importer_jobs.rb:9:in 'block in perform'", "/opt/openmap/carto/cartodb/lib/resque/base_job.rb:21:in 'call'", "/opt/openmap/carto/cartodb/lib/resque/base_job.rb :21:in 'run_action'", "/opt/openmap/carto/cartodb/lib/resque/importer_jobs.rb:9:in 'perform'", "/usr/local/lib/ruby/gems/1.9.1 /gems/resque-1.25.2/lib/resque/job.rb:240:in 'block (3 level) in perform'", "/usr/local/lib/ruby/gems/1.9.1/gems/resque -metrics-0.1.1/lib/resque/metrics.rb:353:in 'around_perform_metrics'", "/usr/local/lib/ruby/gems/1.9.1/gems/resque-1.25.2/lib/resque /job.rb:239:in 'block (2 level) in perform'", "/usr/local/lib/ruby/gems/1.9.1/gems/resque-1.25.2/lib/resque/job.rb :247:in 'call'", "/usr/local/lib/ruby/gems/1.9.1/gems/resque-1.25.2/lib/resque/ job.rb:247:in 'perform'", "/usr/local/lib/ruby/gems/1.9.1/gems/resque-1.25.2/lib/resque/worker.rb:250:in 'perform' ", "/usr/local/lib/ruby/gems/1.9.1/gems/resque-1.25.2/lib/resque/worker.rb:189:in 'block in work'", "/usr/local/ lib/ruby/gems/1.9.1/gems/resque-1.25.2/lib/resque/worker.rb:166:in 'loop'", "/usr/local/lib/ruby/gems/1.9.1/ gems/resque-1.25.2/lib/resque/worker.rb:166:in 'work'", "/usr/local/lib/ruby/gems/1.9.1/gems/resque-1.25.2/lib/ resque/tasks.rb:41:in 'block (2 niveaux) dans '", "/usr/local/lib/ruby/1.9.1/rake/task.rb:205:in 'call'", "/usr/local/lib/ruby/1.9.1/rake/task.rb :205:in 'block in execute'", "/usr/local/lib/ruby/1.9.1/rake/task.rb:200:in 'each'", "/usr/local/lib/ruby/1.9 .1/rake/task.rb:200:in 'execute'", "/usr/local/lib/ruby/1.9.1/rake/task.rb:158:in 'block in invoke_with_call_chain'", "/usr /local/lib/ruby/1.9.1/monitor.rb:211:in 'mon_synchronize'", "/usr/local/lib/ruby/1.9.1/rake/task.rb:151:in 'invoke_with_call_chain'" , "/usr/local/lib/ruby/1.9.1/rake/task.rb:144:in 'invoke'", "/usr/local/lib/ruby/1.9.1/rake/application.rb:116 :in 'invoke_task'", "/usr/local/lib/ruby/1.9.1/rake/application.rb:94:in 'block (2 level) in top_level'", "/usr/local/lib/ruby /1.9.1/rake/application.rb:94:in 'each'", "/usr/local/lib/ruby/1.9.1/rake/application.rb:94:in 'block in top_level'", " /usr/local/lib/ruby/1.9.1/rake/application.rb:133:in 'standard_exception_handling'", "/usr/local/lib/ruby/1.9.1/rake/application.rb:88:in 'top_level'", "/usr/local/lib/ruby/1.9.1/ra ke/application.rb:66:in 'block in run'", "/usr/local/lib/ruby/1.9.1/rake/application.rb:133:in 'standard_exception_handling'", "/usr/local/ lib/ruby/1.9.1/rake/application.rb:63:in 'run'", "/usr/local/bin/rake:32:in '
'"] vrai: --------------------------------------------- ------- 2015-10-14 11:37:03 UTC : En cours d'enregistrement 2015-10-14 11:37:03 UTC : Après l'exécution de l'importateur 2015-10-14 11:37:03 UTC : Après envoi 2015-10-14 11:37:03 UTC : ERREUR ! === LOG END===

Des idées?


Si vous ne trouvez aucune solution, vous pouvez le faire par root

cd /usr/local/bin mv ogr2ogr ogr2ogr2 vi ogr2ogr #!/bin/bash ogr2ogr2 "[email protected]"

C'est une très mauvaise idée… mais son travail…


Ce qui a fonctionné pour moi, c'est d'installer GDAL comme détaillé dans cette réponse, puis de changer "quel ogr2ogr2" sous app_config.yml pour lire "quel ogr2ogr"