ozgur / python-firebase

Python interface to the Firebase's REST API
http://ozgur.github.com/python-firebase/
MIT License
593 stars 155 forks source link

post() got multiple values for keyword argument 'connection' #51

Open clkasd opened 9 years ago

clkasd commented 9 years ago

This was a closed bug but I think still there is a problem when I post like this : result = firebase.post('/users', new_user, {'print': 'pretty'}, {'X_FANCY_HEADER': 'VERY FANCY'})

I get the following error : post() got multiple values for keyword argument 'connection'

drautb commented 9 years ago

I had the same problem. Did you install via pip? v1.2 on pip doesn't have the latest code. Someone else pointed out that you could work around it by naming the arguments:

result = firebase.post('/users', new_user, params={'print': 'pretty'}, {'X_FANCY_HEADER': 'VERY FANCY'})

That works for me. It would be nice though if there were a new release with the latest code.

clkasd commented 9 years ago

I have installed via pip.But later that day I have solved it using firebase.put function.

amitbend commented 8 years ago

adding to drautb answer - I used something like that: result = frb.post('/strings', data={"whatever":"data"}, params={'print': 'pretty'}) and it worked.

Tester2009 commented 5 years ago

I tried @amitbend code but without params, since I'm not sure what it does. Turn out it work.

result = frb.post('/strings', data={"whatever":"data"})

rayavarapuvikram1 commented 5 years ago

what is the use of parms in this? result = frb.post('/strings', data={"whatever":"data"}, params={'print': 'pretty'})