NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum

Hello,

after compiling osm2pgsql v1.6.0 and all its requirements, I tried to use it. But it did fail with ERROR: Open failed for 'osm': No such file or directory. where could I find out about the file or directory?

osm2pgsql --slim -d gis -C 1600 -H uslamvm3.gre.hpecorp.net -P 5432 --number-process 1 -G --hstore --tag-transform-script ./openstreetmap-carto.lua -S ./openstreetmap-carto.style --log-level=debug -v ./data/gcc-states-140101.osm.pbf 2022-08-16 00:46:32 osm2pgsql version 1.6.0 (1.6.0-244-g65d0d27) Password: 2022-08-16 00:46:34 [0] Database version: 12.11 2022-08-16 00:46:34 [0] PostGIS version: 3.1 2022-08-16 00:46:34 [0] Reading file: osm 2022-08-16 00:46:34 [0] Reading file: ./data/gcc-states-140101.osm.pbf 2022-08-16 00:46:34 [0] Started pool with 1 threads. 2022-08-16 00:46:34 [0] Mid: pgsql, cache=1600 2022-08-16 00:46:34 [0] Setting up table 'planet_osm_nodes' 2022-08-16 00:46:34 [0] Setting up table 'planet_osm_ways' 2022-08-16 00:46:34 [0] Setting up table 'planet_osm_rels' 2022-08-16 00:46:34 [0] Using projection SRS 3857 (Spherical Mercator) 2022-08-16 00:46:34 [0] Using lua based tag transformations with script ./openstreetmap-carto.lua 2022-08-16 00:46:34 [0] Setting up table 'planet_osm_point' 2022-08-16 00:46:34 [0] Setting up table 'planet_osm_line' 2022-08-16 00:46:34 [0] Setting up table 'planet_osm_polygon' 2022-08-16 00:46:34 [0] Setting up table 'planet_osm_roads' 2022-08-16 00:46:34 [0] ERROR: Open failed for 'osm': No such file or directory

asked 16 Aug '22, 00:25

HoangA's gravatar image

HoangA
9113
accept rate: 0%

I have no idea what is happening: the same command on my own osm2pgsql install complains about the file name " ERROR: Open failed for './data/gcc-states-140101.osm.pbf': The system cannot find the file specified." as I would expect.

(18 Aug '22, 10:45) SK53 ♦

I did check all the input files, and they do exist.

looking at code, I do see this error only in:

contrib/libosmium/include/osmium/io/detail/read_write.hpp:

throw std::system_error{errno, std::system_category(), std::string("Open failed for '") + filename + "'"};

but I don't understand why user "osm" is view as file ..

the function "open_for_writing" is called by function in contrib/libosmium/include/osmium/io/writer.hpp:

std::unique_ptr<osmium::io::compressor> compressor = CompressionFactory::instance().create_compressor(file.compression(), osmium::io::detail::open_for_writing(m_file.filename(), options.allow_overwrite), options.sync);

permanent link

answered 17 Aug '22, 00:35

HoangA's gravatar image

HoangA
9113
accept rate: 0%

edited 17 Aug '22, 00:37

permanent link

answered 19 Aug '22, 14:23

HoangA's gravatar image

HoangA
9113
accept rate: 0%

edited 19 Aug '22, 14:24

1

There was no -W in your original query. It really helps if you provide an accurate command line.

(21 Aug '22, 13:35) SK53 ♦

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×16

question asked: 16 Aug '22, 00:25

question was seen: 1,570 times

last updated: 21 Aug '22, 13:35

NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum