Closed TupiNUMBooR closed 6 years ago
Hi,
Thanks for the report.
This script only works with Python 3.4+, which is what the Docker image uses.
By looking at you stacktrace it seems like you are using Python 2.7 (/home/123/.local/lib/python2.7/site-packages/trello_full_backup/__init__.py
), which isn't supported.
I would recommend upgrading to Python 3 on your local machine, or use a virtual environment (using virtualenv
or conda
).
updated and event set python 3 as default with update-alternatives
still does not work
trello-full-backup -a 0
Traceback (most recent call last):
File "/home/123/.local/bin/trello-full-backup", line 7, in <module>
from trello_full_backup import main
ImportError: No module named 'trello_full_backup'
should i do something else?
What is the output of the following commands:
which python
python -V
python -m pip list | grep trello
Have you tried to reinstall the package after switching to Python 3? (pip install trello-full-backup
)
123@123:~$ which python
/usr/bin/python
123@123:~$ python -V
Python 3.5.2
123@123:~$ python -m pip list | grep trello
/usr/bin/python: No module named pip
seems i had to install pip
123@123:~$ apt-get install python3-pip
123@123:~$ pip install trello-full-backup
Trying it:
123@123:~$ TRELLO_API_KEY=123
123@123:~$ TRELLO_TOKEN=123
123@123:~$ trello-full-backup -a 0
==== Backup initiated
Backing up to: 2018-03-04_13-02-26_backup
Incremental: False
Tokenize: False
Backup closed board: False
Backup archived lists: False
Backup archived cards: False
Attachment size limit (bytes): 0
====
Traceback (most recent call last):
File "/home/123/.local/bin/trello-full-backup", line 11, in <module>
sys.exit(main())
File "/home/123/.local/lib/python3.5/site-packages/trello_full_backup/__init__.py", line 5, in main
cli()
File "/home/123/.local/lib/python3.5/site-packages/trello_full_backup/backup.py", line 286, in cli
org_boards_data['me'] = requests.get(my_boards_url).json()
File "/home/123/.local/lib/python3.5/site-packages/requests/models.py", line 892, in json
return complexjson.loads(self.text, **kwargs)
File "/usr/lib/python3.5/json/__init__.py", line 319, in loads
return _default_decoder.decode(s)
File "/usr/lib/python3.5/json/decoder.py", line 339, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/lib/python3.5/json/decoder.py", line 357, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
Same again
Looks like it's failing on the first request.
Did you try with the proper TRELLO_API_KEY
and TRELLO_TOKEN
? (instead of 123)
oooops
123@123:~$ TRELLO_API_KEY=123
123@123:~$ TRELLO_TOKEN=123
i was neglectful
Then you can run the following commands:
export TRELLO_API_KEY=yourapikey export TRELLO_TOKEN=yourtoken
And execute the script:
And it works!
export
with TRELLO_API_KEY
and TRELLO_TOKEN
Both is included in carefully reading instructions Thanks for support and sorry for wasting your time. Should i close issue now?
No problem, I'm glad you managed to make it work :)
Thanks for sharing the steps you took, it might be useful for other people as well!
I have problems running program installed with pip.
I use Russian locale. Docker version works fine.