okfn / dataproxy

Web application (targeted at appengine) to proxy data from certain data types into a JSON-P data type so that users can create mashups against remote data sets.
http://jsonpdataproxy.appspot.com/
Other
75 stars 24 forks source link

Issue with xls files and unexpected keyword argument 'worksheet' #27

Open winbatch opened 10 years ago

winbatch commented 10 years ago

So I've managed to get dataproxy running locally and it works for csv files. When I try with xls files, I get the following error. I get the same error whether I pass worksheet=1 or not. Any idea?

callback(

{

· error:

{

o message: "Data transformation failed. TypeError: parse() got an unexpected keyword argument 'worksheet'",

o title: "Data Transformation Error"

}

}

)

example url used below ( host changed to protect the innocent )

http://host.com:12000/?url=http://host.com:5100/dataset/a86b9d37-aef1-4425-adf5-09a6a0f2302d/resource/a97e5fea-c858-48dd-b56d-0f0f40355683/download/oldexcel.xls&type=XLS&worksheet=1&format=jsonp

mbellotti commented 10 years ago

It's because you've installed your submodules wrong :) Submodules are locked in to a certain commit, they do not update unless you specifically update them (or unless you install them incorrectly... perhaps by doing a git clone in the submodule directory instead of initializing the submodule itself) The parse function comes from the dataconverters library, which in the commit dataproxy depends on looks like this:

https://github.com/okfn/dataconverters/blob/11a7f11dd5068e9c884b24c26bb7e3cb65e5ccc1/dataconverters/xls.py#L16

The CURRENT version of dataconverters, however, looks different:

https://github.com/okfn/dataconverters/blob/master/dataconverters/xls.py#L17

No **kwargs parameter to catch all the misc arguments, so when you give it the parameter "worksheet" it has no idea what you are talking about and errors

There are two ways to fix this:

Alternatively, I'm maintaining a fork of dataproxy here (https://github.com/mbellotti/dataproxy) that you might want to check out. I've updated the dependencies and rewrote some of it to run independently of AppEngine.

rufuspollock commented 10 years ago

@mbellotti your work in the fork looks great - would you consider submitting a pull request to get your changes merged upstream?

mbellotti commented 10 years ago

Sure if you think they're appropriate :)

rufuspollock commented 10 years ago

Submit them and we can see :-)