Skip to content
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

Switch from py-trello to py-trello-api lib #5

Merged
merged 1 commit into from
May 15, 2024

Conversation

evansalter
Copy link
Contributor

This script was failing with the following error:

trello.exceptions.ResourceUnavailable: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<HTML><HEAD><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<TITLE>ERROR: The request could not be satisfied</TITLE>
</HEAD><BODY>
<H1>403 ERROR</H1>
<H2>The request could not be satisfied.</H2>
<HR noshade size="1px">
Bad request.
We can't connect to the server for this app or website at this time. There might be too much traffic or a configuration error. Try again later, or contact the app or website owner.
<BR clear="all">
If you provide content to customers through CloudFront, you can find steps to troubleshoot and help prevent this error by reviewing the CloudFront documentation.
<BR clear="all">
<HR noshade size="1px">
<PRE>
Generated by cloudfront (CloudFront)
Request ID: 2BHvqzbTpNlQ7rF3Xl8e4QO_-VnzEnTA9e__ZmEP2YGQeXt8lmuyAQ==
</PRE>
<ADDRESS>
</ADDRESS>
</BODY></HTML> at https://api.trello.com/1/members/me (HTTP status: 403)

Turns out Trello made some changes to their API, and the library we were using seems to be abandoned: sarumont/py-trello#373

This PR switches to a fork of the original library which implements the required fixes, and the script appears to work as expected now:

NOT TECHNICAL ADVICE: Content made available on this page is intended solely for informational purposes only. It is not, and should not be taken, as professional technical advice by any user, who accepts full responsibility for its use. The content made available on this page is general in nature and without knowledge or reference to any users’ technical systems. No user should rely on, take or fail to take any action based on this content and, in all cases, should consult with their own technical advisors familiar with their technical systems before implementing any of the content made available here.

THE CONTENT ON THIS PAGE IS PROVIDED ON AN AS-IS BASIS WITH NO REPRESENTATIONS OF COMPLETENESS, ACCURACY, USEFULNESS OR TIMELINESS, AND WITHOUT WARRANTIES OF ANY KIND WHATSOEVER, EXPRESS OR IMPLIED.


Press Enter to continue...


First, you'll need a Trello API key. This can be created here: https://trello.com/power-ups/admin 

Make sure you are logged in with the correct user when you create the API key. Once created, copy the key to your clipboard. You'll need it in the next step.

See the README for more details.

Press Enter to continue...


Paste your API key here: <REDACTED>
Paste your API token here: <REDACTED>

The user associated with this token is "Evan Salter <evansalter2>". Is this the correct user that you want added to the boards? (y/n): y

Choose a workspace to add the user to:
1. evansworkspace111
2. Exit

Enter your choice: 1

Workspace "evansworkspace111" selected.

Found 9 boards in "evansworkspace111".
Evan Salter is already a member of 9 of these.
There are no boards to add the user to. Returning to workspace selection

Choose a workspace to add the user to:
1. evansworkspace111
2. Exit

Enter your choice: 2

@evansalter evansalter self-assigned this May 15, 2024
@evansalter evansalter requested a review from banana-bread May 15, 2024 16:27
@evansalter evansalter merged commit 99f1b70 into main May 15, 2024
5 checks passed
@evansalter evansalter deleted the fix/trello-api-deprecation branch May 15, 2024 16:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants