chilli-axe / mpc-autofill

Print automation software (leveraging MakePlayingCards) for your tabletop gaming community
https://mpcautofill.github.io
GNU General Public License v3.0
206 stars 94 forks source link

Issue with docker-compose #44

Open ners10100100 opened 2 years ago

ners10100100 commented 2 years ago

when I run docker-compose up it fails every time on the

RUN ./docker/django/check_client_secrets.sh && \
    ./docker/django/check_drives.sh

part. I get the following in console:

#14 [10/15] RUN ./docker/django/check_client_secrets.sh &&     ./docker/django/check_drives.sh
#14 sha256:b737e1e823af7edfa5028d727d29df55f9b40c7fa9b2f2dfee0a7442041f241b
#14 0.334 /bin/sh: 1: ./docker/django/check_client_secrets.sh: not found
#14 ERROR: executor failed running [/bin/sh -c ./docker/django/check_client_secrets.sh &&     ./docker/django/check_drives.sh]: exit code: 127
------
 > [10/15] RUN ./docker/django/check_client_secrets.sh &&     ./docker/django/check_drives.sh:
------
executor failed running [/bin/sh -c ./docker/django/check_client_secrets.sh &&     ./docker/django/check_drives.sh]: exit code: 127
Service 'django' failed to build : Build failed

both files are in place. But it seems that the scripts itself can't be found. I'm on win 10 by the way. Any Ideas what I'm doing wrong?

ljrobison commented 2 years ago

I am having the same exact problem when running docker-compose. You can see an image of the console log here: https://i.imgur.com/dQn8loP.png

Using Windows 10 and both files exist in the django folder.

ners10100100 commented 2 years ago

Hey! It seems to work now, thank you :) Can anyone tell me if I'm using the correct format for client_secrets.json? This is how my file looks:

{
    "web": {
        "client_id": "somehash.apps.googleusercontent.com",
        "project_id": "some-project-id",
        "auth_uri": "https://accounts.google.com/o/oauth2/auth",
        "token_uri": "https://oauth2.googleapis.com/token",
        "auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs",
        "client_secret": "a-secret"
    }
}
fklemme commented 2 years ago

You usually don't need to bother with the file manually. Just go to https://console.cloud.google.com/iam-admin/serviceaccounts and select your project. Then, on your service account, click on "Actions" -> "Manage keys" -> "Add key" -> "JSON". The downloaded file is the right format. Just rename it to client_secrets.json and put it into the MPCAutofill sub-folder.

ners10100100 commented 2 years ago

Holy crap... It worked! Thank you so much!!! Now I only get: exception: "The search index CardSearch does not exist. Usually, this happens because the database is in the middle of updating - check back in a few minutes!" But I guess this is normal because it will take a while, right?

fklemme commented 2 years ago

Hmm, I've seen this one before... #45. But I don't know what the status is. Does the docker output/logs give any hints?

ners10100100 commented 2 years ago

Hmm, not sure. At leaset I can't see something valuable if I do docker-compose logs django

django_1         | Searching: MH2
django_1         | Waiting for Postgres...
django_1         | Waiting for Elasticsearch...
django_1         | Operations to perform:
django_1         |   Apply all migrations: admin, auth, blog, cardpicker, contenttypes, sessions
django_1         | Running migrations:
django_1         |   No migrations to apply.
django_1         | Starting cron daemon for background updates...
django_1         | [2021-10-03 15:44:34 +0000] [1] [INFO] Starting gunicorn 20.1.0
django_1         | [2021-10-03 15:44:34 +0000] [1] [INFO] Listening at: http://0.0.0.0:8000 (1)
django_1         | [2021-10-03 15:44:34 +0000] [1] [INFO] Using worker: sync
django_1         | [2021-10-03 15:44:34 +0000] [23] [INFO] Booting worker with pid: 23
django_1         | /usr/local/lib/python3.8/dist-packages/elasticsearch/connection/base.py:208: ElasticsearchWarning: Elasticsearch built-in security features are not enabled. Without authentication, your cluster could be accessible to anyone. See https://www.elastic.co/guide/en/elasticsearch/reference/7.14/security-minimal-setup.html to enable security.
django_1         |   warnings.warn(message, category=ElasticsearchWarning)
fklemme commented 2 years ago

Can you run the docker_clean_all script and retry? On the first run, the output should be much longer... Hopefully, we can see something there.

ners10100100 commented 2 years ago

This is the complete output:

django_1         | Waiting for Postgres...
django_1         | Waiting for Elasticsearch...
django_1         | Found another file with the destination path 'css/custom.css'. It will be ignored since only the first encountered file is collected. If this is not what you want, make sure every static file has a unique path.
django_1         | Found another file with the destination path 'js/review.js'. It will be ignored since only the first encountered file is collected. If this is not what you want, make sure every static file has a unique path.
django_1         | Found another file with the destination path 'js/index.js'. It will be ignored since only the first encountered file is collected. If this is not what you want, make sure every static file has a unique path.
django_1         | Found another file with the destination path 'js/base.js'. It will be ignored since only the first encountered file is collected. If this is not what you want, make sure every static file has a unique path.
django_1         | Found another file with the destination path 'js/search.js'. It will be ignored since only the first encountered file is collected. If this is not what you want, make sure every static file has a unique path.
django_1         | Found another file with the destination path 'js/js.cookie-2.2.1.min.js'. It will be ignored since only the first encountered file is collected. If this is not what you want, make sure every static file has a unique path.
django_1         | Found another file with the destination path 'js/card.js'. It will be ignored since only the first encountered file is collected. If this is not what you want, make sure every static file has a unique path.
django_1         | Found another file with the destination path 'cardpicker/donate.png'. It will be ignored since only the first encountered file is collected. If this is not what you want, make sure every static file has a unique path.
django_1         | Found another file with the destination path 'cardpicker/template.csv'. It will be ignored since only the first encountered file is collected. If this is not what you want, make sure every static file has a unique path.
django_1         | Found another file with the destination path 'cardpicker/blank.png'. It will be ignored since only the first encountered file is collected. If this is not what you want, make sure every static file has a unique path.
django_1         | Found another file with the destination path 'cardpicker/logolowres.png'. It will be ignored since only the first encountered file is collected. If this is not what you want, make sure every static file has a unique path.
django_1         | Found another file with the destination path 'cardpicker/favicon.ico'. It will be ignored since only the first encountered file is collected. If this is not what you want, make sure every static file has a unique path.
django_1         | Found another file with the destination path 'cardpicker/error_404_med.png'. It will be ignored since only the first encountered file is collected. If this is not what you want, make sure every static file has a unique path.
django_1         | Found another file with the destination path 'cardpicker/error_404.png'. It will be ignored since only the first encountered file is collected. If this is not what you want, make sure every static file has a unique path.
django_1         | Found another file with the destination path 'cardpicker/paypal.svg'. It will be ignored since only the first encountered file is collected. If this is not what you want, make sure every static file has a unique path.
django_1         | Found another file with the destination path 'cardpicker/autofill-cardshand.png'. It will be ignored since only the first encountered file is collected. If this is not what you want, make sure every static file has a unique path.
django_1         |
django_1         | 144 static files copied to '/MPCAutofill/static', 174 post-processed.
django_1         | Migrate Django database...
django_1         | Operations to perform:
django_1         |   Apply all migrations: admin, auth, blog, cardpicker, contenttypes, sessions
django_1         | Running migrations:
django_1         |   Applying contenttypes.0001_initial... OK
django_1         |   Applying auth.0001_initial... OK
django_1         |   Applying admin.0001_initial... OK
django_1         |   Applying admin.0002_logentry_remove_auto_add... OK
django_1         |   Applying admin.0003_logentry_add_action_flag_choices... OK
django_1         |   Applying contenttypes.0002_remove_content_type_name... OK
django_1         |   Applying auth.0002_alter_permission_name_max_length... OK
django_1         |   Applying auth.0003_alter_user_email_max_length... OK
django_1         |   Applying auth.0004_alter_user_username_opts... OK
django_1         |   Applying auth.0005_alter_user_last_login_null... OK
django_1         |   Applying auth.0006_require_contenttypes_0002... OK
django_1         |   Applying auth.0007_alter_validators_add_error_messages... OK
django_1         |   Applying auth.0008_alter_user_username_max_length... OK
django_1         |   Applying auth.0009_alter_user_last_name_max_length... OK
django_1         |   Applying auth.0010_alter_group_name_max_length... OK
django_1         |   Applying auth.0011_update_proxy_permissions... OK
django_1         |   Applying auth.0012_alter_user_first_name_max_length... OK
django_1         |   Applying cardpicker.0001_initial... OK
django_1         |   Applying cardpicker.0002_auto_20210120_2349... OK
django_1         | /usr/local/lib/python3.8/dist-packages/django/db/models/fields/__init__.py:1416: RuntimeWarning: DateTimeField Source.date received a naive datetime (2021-10-03 15:42:28.419062) while time zone support is active.
django_1         |   warnings.warn("DateTimeField %s received a naive datetime (%s)"
django_1         | /usr/local/lib/python3.8/dist-packages/django/db/models/fields/__init__.py:1416: RuntimeWarning: DateTimeField Source.date received a naive datetime (2021-10-03 15:42:28.435130) while time zone support is active.
django_1         |   warnings.warn("DateTimeField %s received a naive datetime (%s)"
django_1         | /usr/local/lib/python3.8/dist-packages/django/db/models/fields/__init__.py:1416: RuntimeWarning: DateTimeField Source.date received a naive datetime (2021-10-03 15:42:28.435269) while time zone support is active.
django_1         |   warnings.warn("DateTimeField %s received a naive datetime (%s)"
django_1         |   Applying cardpicker.0003_source_date... OK
django_1         | /usr/local/lib/python3.8/dist-packages/django/db/models/fields/__init__.py:1416: RuntimeWarning: DateTimeField Card.date received a naive datetime (2021-10-03 15:42:28.443149) while time zone support is active.
django_1         |   warnings.warn("DateTimeField %s received a naive datetime (%s)"
django_1         | /usr/local/lib/python3.8/dist-packages/django/db/models/fields/__init__.py:1416: RuntimeWarning: DateTimeField Card.date received a naive datetime (2021-10-03 15:42:28.443790) while time zone support is active.
django_1         |   warnings.warn("DateTimeField %s received a naive datetime (%s)"
django_1         | /usr/local/lib/python3.8/dist-packages/django/db/models/fields/__init__.py:1416: RuntimeWarning: DateTimeField Card.date received a naive datetime (2021-10-03 15:42:28.443894) while time zone support is active.
django_1         |   warnings.warn("DateTimeField %s received a naive datetime (%s)"
django_1         | /usr/local/lib/python3.8/dist-packages/django/db/models/fields/__init__.py:1416: RuntimeWarning: DateTimeField Cardback.date received a naive datetime (2021-10-03 15:42:28.445556) while time zone support is active.
django_1         |   warnings.warn("DateTimeField %s received a naive datetime (%s)"
django_1         | /usr/local/lib/python3.8/dist-packages/django/db/models/fields/__init__.py:1416: RuntimeWarning: DateTimeField Cardback.date received a naive datetime (2021-10-03 15:42:28.446166) while time zone support is active.
django_1         |   warnings.warn("DateTimeField %s received a naive datetime (%s)"
django_1         | /usr/local/lib/python3.8/dist-packages/django/db/models/fields/__init__.py:1416: RuntimeWarning: DateTimeField Cardback.date received a naive datetime (2021-10-03 15:42:28.446294) while time zone support is active.
django_1         |   warnings.warn("DateTimeField %s received a naive datetime (%s)"
django_1         | /usr/local/lib/python3.8/dist-packages/django/db/models/fields/__init__.py:1416: RuntimeWarning: DateTimeField Token.date received a naive datetime (2021-10-03 15:42:28.448174) while time zone support is active.
django_1         |   warnings.warn("DateTimeField %s received a naive datetime (%s)"
django_1         | /usr/local/lib/python3.8/dist-packages/django/db/models/fields/__init__.py:1416: RuntimeWarning: DateTimeField Token.date received a naive datetime (2021-10-03 15:42:28.448864) while time zone support is active.
django_1         |   warnings.warn("DateTimeField %s received a naive datetime (%s)"
django_1         | /usr/local/lib/python3.8/dist-packages/django/db/models/fields/__init__.py:1416: RuntimeWarning: DateTimeField Token.date received a naive datetime (2021-10-03 15:42:28.448990) while time zone support is active.
django_1         |   warnings.warn("DateTimeField %s received a naive datetime (%s)"
django_1         |   Applying cardpicker.0004_auto_20210214_1126... OK
django_1         |   Applying cardpicker.0005_auto_20210405_0019... OK
django_1         |   Applying cardpicker.0006_auto_20210405_0037... OK
django_1         |   Applying cardpicker.0007_auto_20210405_0043... OK
django_1         |   Applying cardpicker.0008_auto_20210405_1030... OK
django_1         |   Applying cardpicker.0009_remove_source_avgdpi... OK
django_1         |   Applying cardpicker.0010_auto_20210517_2034... OK
django_1         |   Applying cardpicker.0011_auto_20210518_2306... OK
django_1         |   Applying cardpicker.0012_auto_20210518_2352... OK
django_1         |   Applying cardpicker.0013_alter_source_drive_link... OK
django_1         |   Applying cardpicker.0014_auto_20210612_1655... OK
django_1         |   Applying cardpicker.0015_auto_20210614_2157... OK
django_1         |   Applying cardpicker.0016_populate_searchq_keyword... OK
django_1         |   Applying cardpicker.0017_auto_20210815_2107... OK
django_1         |   Applying blog.0001_initial... OK
django_1         |   Applying blog.0002_alter_blogpost_synopsis... OK
django_1         |   Applying blog.0003_showcaseblogpost_card_ids... OK
django_1         |   Applying cardpicker.0018_auto_20210922_1827... OK
django_1         |   Applying sessions.0001_initial... OK
django_1         | Read drives from CSV...
django_1         | Read CSV file and found 10 sources.
django_1         | All sources synchronised from CSV to database.
django_1         | Scan drives and update database...
django_1         | Retrieving Google Drive folders...
django_1         | ...and done!
django_1         | Rebuilding database with all drives.
django_1         | Searching drive: ExampleCards
django_1         | Searching: nofacej MPC Card Backs
django_1         | Found 24 image(s)
django_1         | Number of images found: 24
django_1         |
django_1         | Finished crawling nofacej MPC Card Backs.
100%|??????????| 10/10 [00:05<00:00,  1.92it/s]
django_1         | Synchronising to database... and done! That took 0.028717994689941406 seconds.
django_1         |
django_1         | Searching drive: ExampleCards1
django_1         | Searching: Warpdandy01's Drive
django_1         | Searching: Card Backs
django_1         | Found 29 image(s)
django_1         | Searching: _Other Cards
django_1         | Searching: _Programs, Templates, Misc
django_1         | Searching: Full Art
django_1         | Found 367 image(s)
django_1         | Searching: Drives
django_1         | Searching: All Cards
django_1         | Found 323 image(s)
django_1         | Searching: Vintage Cube 2021 (Old Frames)
django_1         | Found 460 image(s)
django_1         | Found 47 image(s)
django_1         | Searching: Vintage Cube 2021 (Modern Frames)
django_1         | Found 460 image(s)
django_1         | Found 68 image(s)
django_1         | Searching: Full Sets (Scryfall Scans)
django_1         | Searching: Random
django_1         | Searching: Requests
django_1         | Searching: Programs
django_1         | Searching: MTG Set Symbols
django_1         | Searching: Art
django_1         | Found 21 image(s)
django_1         | Searching: Fonts
django_1         | Searching: Templates
django_1         | Searching: MSE
django_1         | Searching: VittorioMasia
django_1         | Searching: SilvanMTG
django_1         | Searching: MrChow1917
django_1         | Searching: Kompreya
django_1         | Searching: Chili
django_1         | Searching: Male MPC Drive as of 1/31/2021
django_1         | Searching: Basic Lands
django_1         | Found 76 image(s)
django_1         | Searching: Double Sided
django_1         | Found 24 image(s)
django_1         | Searching: Basic Lands
django_1         | Found 5 image(s)
django_1         | Searching: Extras
django_1         | Found 1 image(s)
django_1         | Searching: Basic Lands
django_1         | Searching: Double Sided
django_1         | Found 24 image(s)
django_1         | Searching: Game Night
django_1         | Found 59 image(s)
django_1         | Searching: Starter 1999
django_1         | Found 158 image(s)
django_1         | Searching: Game Night 2019
django_1         | Found 64 image(s)
django_1         | Searching: Signature Spellbook - Gideon
django_1         | Found 8 image(s)
django_1         | Searching: Secret Lair Drop
django_1         | Found 70 image(s)
django_1         | Searching: Secret Lair - Ultimate Edition
django_1         | Found 5 image(s)
django_1         | Searching: Signature Spellbook - Chandra
django_1         | Found 8 image(s)
django_1         | Searching: Seventh Edition
django_1         | Found 308 image(s)
django_1         | Searching: Shadows over Innistrad
django_1         | Found 294 image(s)
django_1         | Searching: Scars of Mirrodin
django_1         | Found 234 image(s)
django_1         | Searching: Signature Spellbook - Jace
django_1         | Found 7 image(s)
django_1         | Searching: Shadowmoor
django_1         | Found 279 image(s)
django_1         | Searching: Scourge
django_1         | Found 138 image(s)
django_1         | Searching: San Diego Comic-Con 2014
django_1         | Found 6 image(s)
django_1         | Searching: RNA Guildkit
django_1         | Found 132 image(s)
django_1         | Searching: San Diego Comic-Con 2019
django_1         | Found 5 image(s)
django_1         | Searching: Saviors of Kamigawa
django_1         | Found 156 image(s)
django_1         | Searching: San Diego Comic-Con 2016
django_1         | Found 5 image(s)
django_1         | Searching: San Diego Comic-Con 2018
django_1         | Found 5 image(s)
django_1         | Searching: San Diego Comic-Con 2013
django_1         | Found 5 image(s)
django_1         | Searching: San Diego Comic-Con 2017
django_1         | Found 6 image(s)
django_1         | Searching: San Diego Comic-Con 2015
django_1         | Found 9 image(s)
django_1         | Searching: Rivals of Ixalan
django_1         | Found 206 image(s)
django_1         | Searching: Prophecy
django_1         | Found 143 image(s)
django_1         | Searching: Ravnica - City of Guilds
django_1         | Found 239 image(s)
django_1         | Searching: Portal Three Kingdoms
django_1         | Found 162 image(s)
django_1         | Searching: Pro Tour Promos
django_1         | Found 17 image(s)
django_1         | Searching: Promos
django_1         | Found 4 image(s)
django_1         | Searching: Revised
django_1         | Found 296 image(s)
django_1         | Searching: Nationals Promos
django_1         | Found 1 image(s)
django_1         | Searching: Onslaught
django_1         | Found 335 image(s)
django_1         | Searching: Ponies the Galloping
django_1         | Found 4 image(s)
django_1         | Searching: Planeshift
django_1         | Found 143 image(s)
django_1         | Searching: Mystery Booster Playtest
django_1         | Found 120 image(s)
django_1         | Searching: Oath of the Gatewatch
django_1         | Found 183 image(s)
django_1         | Searching: Planar Chaos
django_1         | Found 163 image(s)
django_1         | Searching: Mythic Edition
django_1         | Found 24 image(s)
django_1         | Searching: Nemesis
django_1         | Found 143 image(s)
django_1         | Searching: New Phyrexia
django_1         | Found 166 image(s)
django_1         | Searching: Judge_s Gift Cards
django_1         | Found 49 image(s)
django_1         | Searching: Love Your LGS
django_1         | Found 2 image(s)
django_1         | Searching: Guru
django_1         | Found 10 image(s)
django_1         | Searching: League Tokens
django_1         | Searching: MagicFest 2020
django_1         | Found 6 image(s)
django_1         | Searching: Morningtide
django_1         | Found 150 image(s)
django_1         | Searching: M19 Gift Pack
django_1         | Found 5 image(s)
django_1         | Searching: Mirrodin Besieged
django_1         | Found 150 image(s)
django_1         | Searching: Magic Player Rewards
django_1         | Found 52 image(s)
django_1         | Searching: MagicFest 2019
django_1         | Found 7 image(s)
django_1         | Searching: ZNR
django_1         | Found 306 image(s)
django_1         | Searching: ZNC
django_1         | Found 6 image(s)
django_1         | Searching: KHC
django_1         | Found 16 image(s)
django_1         | Searching: STX
django_1         | Found 290 image(s)
django_1         | Searching: JMP
django_1         | Found 37 image(s)
django_1         | Searching: C21
django_1         | Found 81 image(s)
django_1         | Searching: MH2
django_1         | Waiting for Postgres...
django_1         | Waiting for Elasticsearch...
django_1         | Operations to perform:
django_1         |   Apply all migrations: admin, auth, blog, cardpicker, contenttypes, sessions
django_1         | Running migrations:
django_1         |   No migrations to apply.
django_1         | Starting cron daemon for background updates...
django_1         | [2021-10-03 15:44:34 +0000] [1] [INFO] Starting gunicorn 20.1.0
django_1         | [2021-10-03 15:44:34 +0000] [1] [INFO] Listening at: http://0.0.0.0:8000 (1)
django_1         | [2021-10-03 15:44:34 +0000] [1] [INFO] Using worker: sync
django_1         | [2021-10-03 15:44:34 +0000] [23] [INFO] Booting worker with pid: 23
django_1         | /usr/local/lib/python3.8/dist-packages/elasticsearch/connection/base.py:208: ElasticsearchWarning: Elasticsearch built-in security features are not enabled. Without authentication, your cluster could be accessible to anyone. See https://www.elastic.co/guide/en/elasticsearch/reference/7.14/security-minimal-setup.html to enable security.
django_1         |   warnings.warn(message, category=ElasticsearchWarning)
fklemme commented 2 years ago

So far, looks perfectly fine... Can you give me any details about your setup? OS/Browser? I wonder if I can reproduce the error. Also, did you check that the problem still persists after the docker cleanup?

ners10100100 commented 2 years ago

I'm on Win10 Home Edition and Chrome 94.0.4606.61 edit: yes, it still happens after the cleanup

ners10100100 commented 2 years ago

I tried with only one drive in the drives.csv and it works. So I guess I'll work my way up by adding one more each time.

fklemme commented 2 years ago

Sounds like a good approach. Please share, if you figured something out. One thing I can think of: Make sure that your drive descriptions are in quotes if there are any special characters (especially commas).