-
Notifications
You must be signed in to change notification settings - Fork 327
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ResourceUnavailable after calling some APIs containing write operations #42
Comments
@kennethzfeng I just installed your fixes and I'm still getting 400 - Resource unavailable on write operations. Just curious if you still face the issue with this fix? |
@hany55 Let me take a look tonight. |
Hi @hany55, You are right. I am still getting the errors with the same script I ran. It seems to be very specific to the oauth2 implementation. The same url coming out of the error message generates a successful response using requests and other web browsers. |
oauth2 is pretty strict about the uppercase T and basically ruins the request: It doesn't put the OAuth data in the request's headers but replaces the body instead. Refs sarumont#42.
Hi,
I am using py-trello for a project. One of the dependency 'oauth2' was missing from the PyPI version of the package, which is very old (0.6.0). I was able to figure the oauth2.Consumer class was present in later release of the package by using the latest simplegeo/python-oauth2. However, the program seems to behave very weird. I kept getting HTTP 400 randomly. I was able to have some lucks with py-trello until making a call to anything contains write operation like below.
The token requested contains read and write access. Expiration was set to never.
I tested the same operations using requests. It worked fine without issues.
Here is the stack trace
I forked the library and ran
nosetests -v test/
. It seems to confirm my observation.If you could quickly pin point the issue, that's great.
If not, that's still fine. It seems like it's better to migrate to requests from httplib2 and to rauth from oauth2. If you agree, I will send you pull requests after I am done with the migration.
Kenneth
The text was updated successfully, but these errors were encountered: