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

Syntax Error @ board: #12

Closed
epe opened this issue Nov 9, 2020 · 5 comments · Fixed by #13
Closed

Syntax Error @ board: #12

epe opened this issue Nov 9, 2020 · 5 comments · Fixed by #13

Comments

@epe
Copy link

epe commented Nov 9, 2020

Hi,
Nice tool, I was excited to find it! I tried using it last night, but got 2 Errors. I'm not a python genius, but usually get around using pip, python and scripts, but I didnt manage to get around these errors:

Error #1
File "./scripts/trello-to-deck", line 32
SyntaxError: Non-ASCII character '\xe2' in file ./scripts/trello-to-deck on line 32, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details

Error #2
user@shell$ python scripts/trello-to-deck
File "scripts/trello-to-deck", line 36
board: Board = to_board(
^
SyntaxError: invalid syntax

Running on my notebook with elementary Linux and the following versions:

  • Python 2.7.17 (default, Sep 30 2020, 13:38:04)
    [GCC 7.5.0] on linux2
    *uname -a: Linux topaz 5.4.0-52-generic #57~18.04.1-Ubuntu SMP Thu Oct 15 14:04:49 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

Am I missing a pip/python dependency?
thanks for your recommendation!

@maxammann
Copy link
Owner

The script only works with python3. So try to run the following:

pip3 install .
trello-to-deck

@epe
Copy link
Author

epe commented Nov 9, 2020

Hi Max, I did that, failed, so tried again starting from scrap:
git clone, pip3 install .
Is there something more I need to do?

What makes your system start the command without calling python3 or python3.6? Do you copy the files to a /usr/bin dir? or have some magic env variable?
trello_to_deck
trello_to_deck: Befehl nicht gefunden.

python3.6 ./scripts/trello-to-deck
Traceback (most recent call last):
File "./scripts/trello-to-deck", line 7, in
from trello_to_deck.trello import to_board, Board
File "/home/eric/.local/lib/python3.6/site-packages/trello_to_deck/trello.py", line 1, in
from dataclasses import dataclass
ModuleNotFoundError: No module named 'dataclasses'

@chaudum
Copy link
Contributor

chaudum commented Nov 10, 2020

Hi Max, I did that, failed, so tried again starting from scrap:
git clone, pip3 install .
Is there something more I need to do?

No, installing using pip3 should be sufficient.
What does pip3 --version say about the version?

What makes your system start the command without calling python3 or python3.6? Do you copy the files to a /usr/bin dir? or have some magic env variable?

When you install via pip3 the package is installed into the site-packages of the Python version of pip3.

trello_to_deck
trello_to_deck: Befehl nicht gefunden.

python3.6 ./scripts/trello-to-deck
Traceback (most recent call last):
File "./scripts/trello-to-deck", line 7, in
from trello_to_deck.trello import to_board, Board
File "/home/eric/.local/lib/python3.6/site-packages/trello_to_deck/trello.py", line 1, in
from dataclasses import dataclass
ModuleNotFoundError: No module named 'dataclasses'

dataclasses are new in Python 3.7, see https://docs.python.org/3/library/dataclasses.html, but you're using Python 3.6.

@epe
Copy link
Author

epe commented Nov 10, 2020

Ok, thanks to all.

My experience - Maybe use this for documentation if it makes sense?

On an average Ubuntu/Debian/Elementary Machine you would have to do:

apt install python3.7
git clone git@github.com:maxammann/trello-to-deck.git
python3.7 -m pip install .
python3.7 scripts/trello-to-deck $input_json $nextcloud_instance $username $password

@epe epe closed this as completed Nov 10, 2020
@maxammann
Copy link
Owner

Thanks for providing the solution :)

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 a pull request may close this issue.

3 participants