Skip to content
This repository has been archived by the owner on Feb 10, 2022. It is now read-only.

ERROR 400 Backslash problem Replacement of / with %2F (SOLVED temporarily) #51

Open
giskard333 opened this issue Aug 29, 2020 · 4 comments

Comments

@giskard333
Copy link

Hi !

I have a problem when i try:

resource=orders/search/recent?seller=$SELLER_ID

this:
https://api.mercadolibre.com/orders/search/recent?seller=$SELLER_ID&access_token=$ACCESS_TOKEN
became this:
https://api.mercadolibre.com/orders%2Fsearch%2Frecent%3Fseller%3D$SELLER_ID
and throw error 400 (backslash problem)

SOLVED editing in file: rest.py

url=url.replace("%2F",'/')
url=url.replace("%3F",'?')
url=url.replace("%3D",'=')

saludos

@giskard333
Copy link
Author

giskard333 commented Aug 29, 2020

working around.
File rest.py. Line 153.

my temporarily fix for this:

url=url.replace("%2F",'/')
url=url.replace("%3F",'?')
url=url.replace("%3D",'=')

url_temp=str(url).split('?')[0] #scan url for this specific query

if (url_temp=="https://api.mercadolibre.com/orders/search/recent"):
url = url+'&' + urlencode(query_params) #using ampersand instead of question mark
query_params={} #must get empty dict here, otherwise blowup

Now the query works fine.

@smarley2
Copy link

smarley2 commented Sep 8, 2020

Bad request 400.
Same issue here.
I used the requests directly to final link and solved.
Will wait for the update of library,

@gusarg81
Copy link

Then you will wait forever.... they never respond to any issue of this sdk...

@WellingtonNico
Copy link

hello guys, do some of you can help me? i cant even get access token, is there an easier way to get that? im trying with requests library, i dont have redirect_uri, just a simple app in my local computer, so i use a dummy redirect_uri, does this matter?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants