title: Osm2pgsql failed due to ERROR: Cannot detect file format
body: <p>Please help in resolving the error that I am getting while importing the OSM database to postgresql using Osm2pgsql for windows.</p>
  
  <p>Command and log is as shown below</p>
  
  <p><code>C:\osm2pgsql-bin&gt;osm2pgsql osm.pbf -s -c -d suhas -U suhas -W Oracle@123 -H localhost -P 5432 -r pbf -S default.style
  osm2pgsql version 0.96.0 (64 bit id space)</code></p>
  
  <p><code>Password:
  Using built-in tag processing pipeline
  Using projection SRS 3857 (Spherical Mercator)
  Setting up table: planet_osm_point
  Setting up table: planet_osm_line
  Setting up table: planet_osm_polygon
  Setting up table: planet_osm_roads
  Allocating memory for sparse node cache
  Node-cache: cache=800MB, maxblocks=12800*65536, allocation method=9
  Mid: pgsql, cache=800
  Setting up table: planet_osm_nodes
  Setting up table: planet_osm_ways
  Setting up table: planet_osm_rels</code></p>
  
  <p><code>Reading in file: osm.pbf
  Using PBF parser.
  Processing: Node(81188k 339.7k/s) Way(10632k 69.95k/s) Relation(42710 225.98/s)  parse time: 580s</code></p>
  
  <p><code>Reading in file: Oracle@123
  Using PBF parser.
  node cache: stored: 52428801(64.58%), storage efficiency: 50.00% (dense blocks: 0, sparse nodes: 52428801), hit rate: 72.73%
  Osm2pgsql failed due to ERROR: Open failed for 'Oracle@123': The system cannot find the file specified.</code></p>