[OSM-dev] Can't import data using Osmosis

Shaun McDonald shaun at shaunmcdonald.me.uk
Sat Feb 14 10:09:10 GMT 2009


On 14 Feb 2009, at 03:03, Brett Henderson wrote:

> G H S wrote:
>> Hi all.
>>
>> I have a MySQL database set up and I'm trying to use Osmosis to get  
>> an
>> OSM extract XML file into it.  I followed the command-line pattern as
>> shown at http://wiki.openstreetmap.org/wiki/Osmosis, but I'm getting
>> an error:
>>
>> om.bretth.osmosis.core.OsmosisRuntimeException: Only one default
>> (un-named) argument can exist per task.  Arguments 4 and 3 have no  
>> name.
>>
>> Here's the command line I used:
>>
>> osmosis --read-xml file="/users/myusername/Desktop/OSM\ stuff/OSM\
>> data/illinois.osm" --write-mysql host="localhost" database="OSM"
>> user="myusername" password=""
> Could it have something to do with the fact that you're escaping  
> spaces
> with slashes (ie. "\ "), but you also have the file names surrounded
> with quotes?  I don't know anything about Mac OS.  What shell does it
> use?  The error messages are saying that the 3rd and 4th arguments (1
> based index) are problematic.  I think this should be the --write- 
> mysql
> and host="localhost" parts of the command line but it's hard to tell
> with the mixed quotes and escapes.
>

Mac OS X uses the bash shell by default. Most of the shells available  
on Mac OS X are the same as on Ubuntu.
Brett's suggestion should help.

Shaun





More information about the dev mailing list