Open thallia opened 6 years ago
I resolved this by going into site-packages and -
updating import text in my code to from trello.trelloclient import TrelloClient
updating import in init.py to use from urllib.parse import quote_plus
per https://github.com/sarumont/py-trello/issues/220
updating all relative imports to direct ones (i.e. in Board.py changing from trello import TrelloBase to from trello.base import TrelloBase) for init.py, Card.py, Checklist.py, Member.py, Organization.py, CustomField.py, Label.py, TrelloList.py, Star.py
Not sure if this breaks compatibility anywhere but this worked for me
ededdneddyfan can you send a patch (a diff -u) so that other people may do exactly the same thing?
if this code has been abandoned (which given that it's been four months and no reply it looks like it has), i may create a hard fork of it and will let you know where it can be obtained from... i will need those patches, though ededdneddyfan, otherwise i (and other people) have to duplicate absolutely everything that you did.
Patches/PRs are welcome and will be merged and pushed to PyPi. The project is no longer under active development, but it is not completely abandoned. :)
@ededdneddyfan I can't even find the line import quote_plus
in this repo so that we could fix it here instead of creating manually-edited workarounds. @sarumont any hints?
Hi @AlexanderLill - not quite sure what happened w/ that line since July. If I get some time I will try to dig up the changes but I think they're lost (recently switched to a new setup on my machine)
I am using it now just with from trello.trelloclient import TrelloClient
and everything seems to work, maybe you can verify this @ededdneddyfan and this issue resolved itself :)
(I am only using board.open_cards()
, board.closed_cards()
and card.fetch_actions()
)
Python: Python 3.7.0 py-trello: py-trello 0.11.3
@AlexanderLill I've got the following in my code and still getting the same error. What am I missing?
'from trello.trelloclient import TrelloClient
client = TrelloClient( api_key='#########', api_secret='#############################################', token='your-oauth-token-key', token_secret='your-oauth-token-secret' )
all_boards = client.list_boards() last_board = all_boards[-1] print(last_board.name)`
Getting this error as well... ModuleNotFoundError: No module named 'trello.trelloclient'; 'trello' is not a package
I've installed is using Pip.
Windows 10 Python 3.6.5
There's probably a confusion here and in #220 -- There is an older unmaintained trello project on PyPI (what you get when doing pip install trello
). However, this project, py-trello
is a completely different project, although the import name is the same.
According to the git history of this project, that import never existed, so this issue must refer to the old unmaintained trello project.
@spyoungtech I'm still confused. How does someone import this library into a Python 3.7 project then? I've tried the suggestions in this thread with no luck. Searching the code hasn't proved helpful either. I'm using this for a tiny job - just to leave a comment on a card. I'm including py-trello
in my requirements.txt
Thanks
It appears to be working as expected for me, so not sure what is going on for others
FWIW I'm running Debian Sid (currently I have python 3.7.5) and just installed py-trello like this:
sudo pip3 install py-trello
Then the following "just works":
from trello import TrelloClient
client = TrelloClient(
api_key='MY_API_KEY',
api_secret='MY_API_TOKEN')
all_boards = client.list_boards()
last_board = all_boards[-1]
print(last_board.name)
And it output the name of the board that I had just created... So I'm not really sure what is going on for others...
I am getting this error in Heroku using either python 3.6.10 or 3.7.6. Neither of these work.
from trello import TrelloClient
from trello.trelloclient import TrelloClient
When I run it in Google Colab on 3.6.9, it works fine. Py-trello version 0.16.0. I tried 0.11.3 as someone indicated above and got the same error.
EDIT: I tried it in Python 2.7 which gave the same message, so it is some other issue. Not clear how to debug.
EDIT2: Solved it. Silly mistake: I named one of my files trello.py, so it was trying to import that instead of py-trello.
I have the latest version of py-trello, checked with
pip list
, as well as Python 3. I see some others having this error, but I haven't come across any fixes yet.My code errors on the line from the README:
from trello import TrelloClient
EDIT: It's because there's no support for Python3, currently. It worked on python2.7.