python-firebase icon indicating copy to clipboard operation
python-firebase copied to clipboard

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

Open clkasd opened this issue 9 years ago • 5 comments

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'

clkasd avatar Nov 03 '15 12:11 clkasd

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.

drautb avatar Dec 02 '15 03:12 drautb

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

clkasd avatar Dec 02 '15 08:12 clkasd

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

amitbend avatar Jan 17 '16 22:01 amitbend

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"})

Tester2009 avatar Dec 10 '18 04:12 Tester2009

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

rayavarapuvikram1 avatar Oct 19 '19 19:10 rayavarapuvikram1