Giter Club home page Giter Club logo

trello-py's People

Contributors

adeusz avatar andreivulpe avatar cmuozdiaz avatar dependabot[bot] avatar kulikjak avatar lazytarget avatar lukegb avatar tghw avatar waghanza avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

trello-py's Issues

Could we get 0.9.2 pushed to PyPi?

Hi,

Looks like it has fixed a few issues including Python 3 support which would be super handy. Any chance we could get this version uploaded to PyPi?

Thanks!

Updating a card

I'm trying to update a card, setting closed to True to hide it from the list:

trello.cards.update(card["id"], closed=True)

And this is the error I get:

Traceback (most recent call last):
  File "/home/rcdeoliveira/.local/bin/./update-trello.py", line 39, in <module>
    trello.cards.update(card["id"], closed=True)
  File "/home/rcdeoliveira/.local/lib/python3.10/site-packages/trello/cards.py", line 81, in update
    return self.raise_or_json(resp)
  File "/home/rcdeoliveira/.local/lib/python3.10/site-packages/trello/base.py", line 3, in raise_or_json
    resp.raise_for_status()
  File "/usr/lib/python3/dist-packages/requests/models.py", line 960, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 400 Client Error: Bad Request for url: https://trello.com/1/cards/{cardId}?key={key}&token={token}

Am I doing something wrong?

urllib quote_plus

From Python 3.4 quote_plus is moved to urlib.parse, for that version you have to change the import in trello.init.py:

from urllib.parse import quote_plus

403 Response on GET requests to trello due to breaking change at atlassian

Trello’s API will no longer permit supplying a body with a GET request. Previous behavior in our API ignored the payloads provided with GET requests but these requests will now be blocked with a 403 response from our content delivery network.

To resolve issues resulting from this change ensure all GET requests to Trello’s API are sent without a payload.

https://developer.atlassian.com/changelog/#CHANGE-1459

Setting data to none on GET seems to fix it

# inside trelloclient.py

def fetch_json(
...
...
# set content type and accept headers to handle JSON
if http_method in ("POST", "PUT", "DELETE") and not files:
    headers['Content-Type'] = 'application/json; charset=utf-8'

headers['Accept'] = 'application/json'

# ADD THIS PART HERE
if http_method in ("GET"):
    data = None

Hope this helps someone

Version 0.9.3 is missing requests dependency

I've installed 0.9.3 but it isn't pulling down Requests package automatically when I install it. It looks like it is just missing from the setup.py (see attached) even though you have it listed in the master version which is labelled 0.9.2

setup.zip

Documentation

Is there any documentation, specifically on how to add items to the board?

Multiple definitions for the Webhooks.update() method

See this and this. There are two .update() methods in the Webhooks class that take different parameters. Looks like a Java-style pattern. However, in Python, it doesn't work like in Java - the second method definition simply overrides the previous one. The result is confusing: by looking at code, you may think that there's a method for updating a webhook by its ID, but in practice, there isn't because it was overridden by the second definition below.

Has this code worked since 3666d8ab?

I am confused because it seems that this code has been invalid since commit 3666d8a in 2012, when it was regenerated. Yet people have submitted minor patches since then, none of which fix the glaring syntax problem.

Am I missing something? I tried with Python 3.4.3 and hit the obivous (unless slashes in variable names are a Python 3 feature that I have not read about and the error is elsewhere) syntax error:

$ python -m trello
Traceback (most recent call last):
  File "/Users/wcooley/anaconda/envs/python-3.4/lib/python3.4/runpy.py", line 151, in _run_module_as_main
    mod_name, mod_spec, code = _get_module_details(mod_name)
  File "/Users/wcooley/anaconda/envs/python-3.4/lib/python3.4/runpy.py", line 118, in _get_module_details
    return _get_module_details(pkg_main_name)
  File "/Users/wcooley/anaconda/envs/python-3.4/lib/python3.4/runpy.py", line 104, in _get_module_details
    spec = importlib.util.find_spec(mod_name)
  File "/Users/wcooley/anaconda/envs/python-3.4/lib/python3.4/importlib/util.py", line 86, in find_spec
    parent = __import__(parent_name, fromlist=['__path__'])
  File "/Users/wcooley/src/trello-py/trello/__init__.py", line 3, in <module>
    from .boards import Boards
  File "/Users/wcooley/src/trello-py/trello/boards.py", line 96
    def update(self, board_id, name=None, desc=None, closed=None, subscribed=None, idOrganization=None, prefs/permissionLevel=None, prefs/selfJoin=None, prefs/cardCovers=None, prefs/invitations=None, prefs/voting=None, prefs/comments=None):
                                                                                                             ^
SyntaxError: invalid syntax

I think the fix should be easy enough -- substitute invalid characters in variable names, but I am unclear if this is code anyone is actually using or I should look for something elsewhere more actively maintained?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.