maxammann / trello-to-deck

trello-to-deck reads from an JSON export of Trello and creates a board in Nextcloud Deck.
MIT License
67 stars 9 forks source link

Script won't execute #11

Closed MoritzGiessmann closed 4 years ago

MoritzGiessmann commented 4 years ago

Cool work @maxammann! I tried to get it working, but somehow the script couldn't be found. I am not that proficient in python. In which environment do you run trello-to-deck? I tried Ubuntu with python3 and pip3, but trello-to-deck just gave me a ModuleNotFoundError: No module named 'trello_to_deck' after successfully installing via pip3 install .

Are there any enviromental things I might have forgotten to set up?

Thanks!

maxammann commented 4 years ago

Did you run pip3 with sudo or did you setup a virtual environment?

Usually if not using a virtualenv then pip3 install required root permissions.

maxammann commented 4 years ago

Also please post the output of echo $PATH

MoritzGiessmann commented 4 years ago

Hey! I did not run pip3 with sudo. Just pip3 install . It seems to have been installed though. trello-to-deck appears to be in /usr/local/bin/ Running trello-to-deck gives me the following error:

Traceback (most recent call last):
File "/usr/local/bin/trello-to-deck", line 6, in <module> from trello_to_deck.deck import DeckAPI
ModuleNotFoundError: No module named 'trello_to_deck'

My echo $PATH looks like this: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin

maxammann commented 4 years ago

That is very weird as installing binaries at /usr/local/bin requires root privileges. This seems like the local installation is kind of weird.

You can try to create a venv though: https://wiki.archlinux.org/index.php/Python/Virtual_environment#Overview

python -m venv envname
source envname/bin/activate
pip install .
trello-to-deck
srhinow commented 4 years ago

the same for me on ubuntu-mate 20.04 and MacOSX 10.14.6 with pip3 installer is successfully: grafik but then run the migrade command:

trello-to-deck micor_trello.json MY_NEXTCLOUD_URL USER 'PASSWORD'

and then comes this result:

Traceback (most recent call last):
  File "/usr/local/bin/trello-to-deck", line 6, in <module>
    from trello_to_deck.deck import DeckAPI
ModuleNotFoundError: No module named 'trello_to_deck'

I think the script folder (with trello.py and deck.py) just needs to be copied with the setup file in a known Python environment.

maxammann commented 4 years ago

I pushed a fix, can you try again?

srhinow commented 4 years ago

My current solution/fix is:

  1. I change the script-names from trello_to_deck/deck.py => trello_to_deck/trello_to_deck_deck.py

  2. I change the script-names from trello_to_deck/trello.py => trello_to_deck/trello_to_deck_trello.py

  3. then add Path to this custom libs-folder in PYTHONPATH: export PYTHONPATH='/home/director/Dropbox/Downloads/trello-to-deck-master/trello_to_deck'

  4. change imports in 'trello_to_deck' grafik

srhinow commented 4 years ago

your changes have i allready tried -> dont works

maxammann commented 4 years ago

hm very weird, I will soon try this on a ubuntu vm

MoritzGiessmann commented 4 years ago

@srhinow Your solution actually worked. I also had to install date-utils via pip3 install python-dateutil

sirnacnud commented 4 years ago

I also had to install python-dateutil on macOS 10.14.6

maxammann commented 4 years ago

I added this dependency and fixed this problem. I forgot to add a init.py