osmottawa/etl2osm

Load class fails to switch functions

Closed this issue · 1 comments

After getting to the __init__ function the function switcher fails with:

Traceback (most recent call last):
  File "C:\komodo\cli.py", line 60, in <module>
    cli()
  File "C:\Python34\lib\site-packages\click\core.py", line 700, in __call__
    return self.main(*args, **kwargs)
  File "C:\Python34\lib\site-packages\click\core.py", line 680, in main
    rv = self.invoke(ctx)
  File "C:\Python34\lib\site-packages\click\core.py", line 873, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "C:\Python34\lib\site-packages\click\core.py", line 508, in invoke
    return callback(*args, **kwargs)
  File "C:\komodo\cli.py", line 52, in cli
    process(infile, **kwargs)
  File "C:\komodo\api.py", line 22, in process
    load(data,**kwargs)
  File "C:\komodo\api.py", line 53, in load
    cl_load.Load(data,kwargs["output"],**kwargs)
  File "C:\komodo\load.py", line 23, in __init__
    write_file[extension](data, outfile, config, **kwargs)
TypeError: write_osm() got multiple values for argument 'config'

Python 3.4

Oh gotcha, it seems that kwargs has config, but it's also been defined as an argument, I'll remove the hardcoded arguments and leave everything in the kwargs. Unless we do a .pop, but I never liked that