GithubHelp home page GithubHelp logo

chilli-axe / mpc-autofill Goto Github PK

View Code? Open in Web Editor NEW
186.0 186.0 90.0 7.39 MB

Print automation software (leveraging MakePlayingCards) for your tabletop gaming community

Home Page: https://mpcautofill.github.io

License: GNU General Public License v3.0

Python 44.30% CSS 0.32% JavaScript 0.21% HTML 1.01% Dockerfile 0.39% Shell 0.34% Batchfile 0.03% SCSS 0.18% TypeScript 53.21%

mpc-autofill's People

Contributors

aitanbachrach avatar avafloww avatar bertranddungan avatar bwsinger avatar candyapplecorn avatar chakeson avatar chilli-axe avatar claythearc avatar cowbacca avatar davidianstyle avatar dependabot[bot] avatar fklemme avatar forgenn avatar glandu-sr avatar investigamer avatar lukegothic avatar mcapu avatar ndepaola avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

mpc-autofill's Issues

Autofill.exe closes after downlading cards

Everything runs fine, the cards are downloaded but then the app closes. I see a bunch of text appears before closing but have no time to read it.
I'm on Windows 10 and Chrome is not my default browser if that could be a be a problem.

Docker Support

If this project had docker support it'd make it a lot easier for others to contribute.

Autofill isn't accurately uploading the correct images to MPC

While importing a 612 card order using autofill, I'm seeing wild inaccuracies after the script completes. I'm guessing only about 60-70% of the images are correct. The remaining cards are images of other cards in my order. Double sided cards are also sometimes getting the wrong card backs. No specific pattern is jumping out at me to explain in the inaccuracies. Talked with folks in the Discord and other folks are also experiencing this.

Supporting alternatives to Google Drive

While Google Drive is a nice interface in a distributed setup, for the time being, it would be helpful to have some alternative for the local execution of the web application. Without a collection of Google Drives available, it would be helpful if own files could be offered easily without the need for a (large, paid) Google Drive. I could imagine having a local folder as an additional source of images or even some other web-space. While I would like to help and contribute in developing such a feature, I think this topic requires the expertise of @ndepaola to judge what is doable and reasonable. Maybe we can do some brainstorming here. I was thinking of a few possibilities:

  1. Support a local drive. This seems to be the most obvious solution but might be tricky to implement. First, Django needs to be aware of the folder to scan it, then it needs to be served via static files to be displayed. And, last but not least, it would need to be added to the order.csv in a way that the files can be copied by the autofill.exe for MPC upload.
  2. Support a common website directory listing, e.g., as generated by Apache (see https://kruecke.net/files/, for example). Then, a local folder (or any other source) could be published using a simple Apache. Django would need to be able to search the directory listing and index all images. Since the files are downloadable via URL, this might be more portable and less error-prone in configuration, also for the autofill client.
  3. Based on the previous, I could imagine building a small php script (or even a small django app) for the server-side to do the indexing and offer all information needed by MPCAutofill directly as JSON or similar. This could simplify the changes to MPCAutofill and only a small extra installation on the offering website is needed.

Anyway, I think all methods would require to add an additional field to the drives.csv and go from there.

What do you think? Is this something worth targeting? Doable in reasonable effort? Or is this rather a different project altogether?

Autofill does not find Brave browser

  • OS: Windows 10 64-bit
  • Version: latest autofill.exe from release 3.2

I don't have Chrome installed on this machine, as I use Brave browser by choice. I would prefer not to have to install Chrome in order to get that working.

Traceback shows:

PS C:\dev\projects\mtg\order_001> .\autofill.exe
MPC Autofill initialising.
Successfully read XML file. Starting card downloader and webdriver processes.
ERROR: The system was unable to find the specified registry key or value.
Traceback (most recent call last):
  File "autofill.py", line 430, in <module>
  File "site-packages\webdriver_manager\chrome.py", line 28, in __init__
  File "site-packages\webdriver_manager\driver.py", line 54, in __init__
  File "site-packages\webdriver_manager\utils.py", line 142, in chrome_version
ValueError: Could not get version for Chrome with this command: reg query "HKEY_CURRENT_USER\Software\Google\Chrome\BLBeacon" /v version
[15988] Failed to execute script autofill

Likely this is a problem for webdriver_manager to try to solve if you wanted to continue using it.

Alternatively, can you catch that exception and fall back to setting up the driver manually, allowing me to select Brave's binary myself? Selenium should be able to use it with the same Chrome driver (see this SO question).

autofill.exe skips card slots when uploading

Hi,

First, thanks again for this great tool that has helped me a lot ordering decks a few months ago.

I'm trying again these days, using the new build, and I'm encountering issues. Cards seem to be skipped unpredictably. There are blank cards and cards that seem shuffled a few positions after their expected one.

I've had issues with other deck uploads, but this one is definitely the worst, with dozens of blank spaces.

image
image

Do you have any idea where it could come from? MPC seems to have performance issues with days, maybe it's related.

You can find the xml enclosed.

cards.txt

Thanks in advance for your help

Add a License

I love what you're working on, and I'm a professional python dev that would like to make some contributions to help make improvements and add features. Without a license, I can't do any of that.

Right now, this code is not open source and contributions (PRs) without written permission may be illegal in some countries. If you add a license, developers like myself could start contributing within the parameters of that license.

The MPC page hangs indefinitely on last wait.

I'm trying to do a large (full 612 card) order. Everything seems to work OK during the upload, but on the last step:

# Page over to the next step from "add text to backs"
wait(driver)
driver.execute_script("javascript:oDesign.setNextStep();")

The page seems to be stuck indefinitely (over an hour) with the "waiting circle" animation. I've had this happen two attempts in a row. Is this an issue for anyone else, or specific to my setup?

This is with chrome Version 91.0.4472.124 (Official Build) (64-bit) running on Windows 10 x64 with the v3.3 release binary.

Can Autofill.exe reuse the images already saved locally rather than download them yet another time?

i just ran a test, by letting autofill.exe read the content of cards.xml, download the images and sending them to MakePlayingCards.com. all worked flawlessly, BRAVO!

however, i wanted to test if Autofill recognizes that the cards are already in the /cards folder stored locally before trying to download them another time if i launch it a second time. Autofill failed! poor tool, can we teach him to check if the files are available locally first?

PS: thanks for the tool! it saves a lot of time!

`docker-compose up` failed (run from mpc-autofill/docker directory)

client_secrets.json and drives.csv both exist inside mpc-autofill/MPCAutofill/ directory.

Getting an error on build:

~/Code/mpc-autofill/docker $ docker-compose up
...
 => ERROR [ 4/16] COPY requirements.txt /MPCAutofill/                                                                                                                                                                                          0.0s
------
 > [ 4/16] COPY requirements.txt /MPCAutofill/:
------
failed to compute cache key: "/requirements.txt" not found: not found
ERROR: Service 'django' failed to build : Build failed

Tried running docker_clean_all.sh prior to docker-compose up and still no luck.

Screen Shot 2022-10-11 at 10 40 18 PM

HTTP 500 when DJANGO_DEBUG=False

When setting DJANGO_DEBUG=False in MPCAutofill/.env, the site hosted with python manage.py runserver 0.0.0.0:8000 simply returns 500. As we already speculated, this is due to a missing python manage.py collectstatic [1, 2]. However, when `collectstaticΒ΄ is run beforehand, there is still an exception in the logs and static files are not served correctly (404). Have a look at this interesting error message:

[27/Sep/2021 10:25:02] DEBUG [django.template:869] Exception while resolving variable 'include_media' in template 'bootstrap/uni_form.html'.
Traceback (most recent call last):
  File "/home/kruecke/Projects/mpc-autofill-local-files/venv/lib/python3.8/site-packages/django/template/base.py", line 829, in _resolve_lookup
    current = current[bit]
  File "/home/kruecke/Projects/mpc-autofill-local-files/venv/lib/python3.8/site-packages/django/template/context.py", line 83, in __getitem__
    raise KeyError(key)
KeyError: 'include_media'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/kruecke/Projects/mpc-autofill-local-files/venv/lib/python3.8/site-packages/django/template/base.py", line 835, in _resolve_lookup
    if isinstance(current, BaseContext) and getattr(type(current), bit):
AttributeError: type object 'Context' has no attribute 'include_media'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/kruecke/Projects/mpc-autofill-local-files/venv/lib/python3.8/site-packages/django/template/base.py", line 843, in _resolve_lookup
    current = current[int(bit)]
ValueError: invalid literal for int() with base 10: 'include_media'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/kruecke/Projects/mpc-autofill-local-files/venv/lib/python3.8/site-packages/django/template/base.py", line 848, in _resolve_lookup
    raise VariableDoesNotExist("Failed lookup for key "
django.template.base.VariableDoesNotExist: Failed lookup for key [include_media] in [{'True': True, 'False': False, 'None': None}, {'True': True, 'False': False, 'None': None, 'field_class': '', 'field_template': 'bootstrap/field.html', 'form_show_errors': True, 'form_show_labels': True, 'label_class': '', 'form': <InputText bound=False, valid=Unknown, fields=(card_list)>}]
[27/Sep/2021 10:25:02] DEBUG [django.template:869] Exception while resolving variable 'tag' in template 'bootstrap/uni_form.html'.
Traceback (most recent call last):
  File "/home/kruecke/Projects/mpc-autofill-local-files/venv/lib/python3.8/site-packages/django/template/base.py", line 829, in _resolve_lookup
    current = current[bit]
  File "/home/kruecke/Projects/mpc-autofill-local-files/venv/lib/python3.8/site-packages/django/template/context.py", line 83, in __getitem__
    raise KeyError(key)
KeyError: 'tag'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/kruecke/Projects/mpc-autofill-local-files/venv/lib/python3.8/site-packages/django/template/base.py", line 835, in _resolve_lookup
    if isinstance(current, BaseContext) and getattr(type(current), bit):
AttributeError: type object 'Context' has no attribute 'tag'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/kruecke/Projects/mpc-autofill-local-files/venv/lib/python3.8/site-packages/django/template/base.py", line 843, in _resolve_lookup
    current = current[int(bit)]
ValueError: invalid literal for int() with base 10: 'tag'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/kruecke/Projects/mpc-autofill-local-files/venv/lib/python3.8/site-packages/django/template/base.py", line 848, in _resolve_lookup
    raise VariableDoesNotExist("Failed lookup for key "
django.template.base.VariableDoesNotExist: Failed lookup for key [tag] in [{'True': True, 'False': False, 'None': None}, {'True': True, 'False': False, 'None': None, 'field_class': '', 'field_template': 'bootstrap/field.html', 'form_show_errors': True, 'form_show_labels': True, 'label_class': '', 'form': <InputText bound=False, valid=False, fields=(card_list)>}, {'forloop': {'parentloop': {}, 'counter0': 0, 'counter': 1, 'revcounter': 1, 'revcounter0': 0, 'first': True, 'last': True}, 'field': <django.forms.boundfield.BoundField object at 0x7f0ce72258e0>}, {}]
[27/Sep/2021 10:25:02] DEBUG [django.template:869] Exception while resolving variable 'wrapper_class' in template 'bootstrap/uni_form.html'.
Traceback (most recent call last):
  File "/home/kruecke/Projects/mpc-autofill-local-files/venv/lib/python3.8/site-packages/django/template/base.py", line 829, in _resolve_lookup
    current = current[bit]
  File "/home/kruecke/Projects/mpc-autofill-local-files/venv/lib/python3.8/site-packages/django/template/context.py", line 83, in __getitem__
    raise KeyError(key)
KeyError: 'wrapper_class'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/kruecke/Projects/mpc-autofill-local-files/venv/lib/python3.8/site-packages/django/template/base.py", line 835, in _resolve_lookup
    if isinstance(current, BaseContext) and getattr(type(current), bit):
AttributeError: type object 'Context' has no attribute 'wrapper_class'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/kruecke/Projects/mpc-autofill-local-files/venv/lib/python3.8/site-packages/django/template/base.py", line 843, in _resolve_lookup
    current = current[int(bit)]
ValueError: invalid literal for int() with base 10: 'wrapper_class'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/kruecke/Projects/mpc-autofill-local-files/venv/lib/python3.8/site-packages/django/template/base.py", line 848, in _resolve_lookup
    raise VariableDoesNotExist("Failed lookup for key "
django.template.base.VariableDoesNotExist: Failed lookup for key [wrapper_class] in [{'True': True, 'False': False, 'None': None}, {'True': True, 'False': False, 'None': None, 'field_class': '', 'field_template': 'bootstrap/field.html', 'form_show_errors': True, 'form_show_labels': True, 'label_class': '', 'form': <InputText bound=False, valid=False, fields=(card_list)>}, {'forloop': {'parentloop': {}, 'counter0': 0, 'counter': 1, 'revcounter': 1, 'revcounter0': 0, 'first': True, 'last': True}, 'field': <django.forms.boundfield.BoundField object at 0x7f0ce72258e0>}, {}]
[27/Sep/2021 10:25:02] DEBUG [django.template:869] Exception while resolving variable 'html5_required' in template 'bootstrap/uni_form.html'.
Traceback (most recent call last):
  File "/home/kruecke/Projects/mpc-autofill-local-files/venv/lib/python3.8/site-packages/django/template/base.py", line 829, in _resolve_lookup
    current = current[bit]
  File "/home/kruecke/Projects/mpc-autofill-local-files/venv/lib/python3.8/site-packages/django/template/context.py", line 83, in __getitem__
    raise KeyError(key)
KeyError: 'html5_required'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/kruecke/Projects/mpc-autofill-local-files/venv/lib/python3.8/site-packages/django/template/base.py", line 835, in _resolve_lookup
    if isinstance(current, BaseContext) and getattr(type(current), bit):
AttributeError: type object 'Context' has no attribute 'html5_required'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/kruecke/Projects/mpc-autofill-local-files/venv/lib/python3.8/site-packages/django/template/base.py", line 843, in _resolve_lookup
    current = current[int(bit)]
ValueError: invalid literal for int() with base 10: 'html5_required'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/kruecke/Projects/mpc-autofill-local-files/venv/lib/python3.8/site-packages/django/template/base.py", line 848, in _resolve_lookup
    raise VariableDoesNotExist("Failed lookup for key "
django.template.base.VariableDoesNotExist: Failed lookup for key [html5_required] in [{'True': True, 'False': False, 'None': None}, {'True': True, 'False': False, 'None': None, 'field_class': '', 'field_template': 'bootstrap/field.html', 'form_show_errors': True, 'form_show_labels': True, 'label_class': '', 'form': <InputText bound=False, valid=False, fields=(card_list)>}, {'forloop': {'parentloop': {}, 'counter0': 0, 'counter': 1, 'revcounter': 1, 'revcounter0': 0, 'first': True, 'last': True}, 'field': <django.forms.boundfield.BoundField object at 0x7f0ce72258e0>}, {}]
[27/Sep/2021 10:25:02] DEBUG [django.template:869] Exception while resolving variable 'help_text_inline' in template 'bootstrap/uni_form.html'.
Traceback (most recent call last):
  File "/home/kruecke/Projects/mpc-autofill-local-files/venv/lib/python3.8/site-packages/django/template/base.py", line 829, in _resolve_lookup
    current = current[bit]
  File "/home/kruecke/Projects/mpc-autofill-local-files/venv/lib/python3.8/site-packages/django/template/context.py", line 83, in __getitem__
    raise KeyError(key)
KeyError: 'help_text_inline'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/kruecke/Projects/mpc-autofill-local-files/venv/lib/python3.8/site-packages/django/template/base.py", line 835, in _resolve_lookup
    if isinstance(current, BaseContext) and getattr(type(current), bit):
AttributeError: type object 'Context' has no attribute 'help_text_inline'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/kruecke/Projects/mpc-autofill-local-files/venv/lib/python3.8/site-packages/django/template/base.py", line 843, in _resolve_lookup
    current = current[int(bit)]
ValueError: invalid literal for int() with base 10: 'help_text_inline'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/kruecke/Projects/mpc-autofill-local-files/venv/lib/python3.8/site-packages/django/template/base.py", line 848, in _resolve_lookup
    raise VariableDoesNotExist("Failed lookup for key "
django.template.base.VariableDoesNotExist: Failed lookup for key [help_text_inline] in [{'True': True, 'False': False, 'None': None}, {'True': True, 'False': False, 'None': None, 'field_class': '', 'field_template': 'bootstrap/field.html', 'form_show_errors': True, 'form_show_labels': True, 'label_class': '', 'form': <InputText bound=False, valid=False, fields=(card_list)>}, {'forloop': {'parentloop': {}, 'counter0': 0, 'counter': 1, 'revcounter': 1, 'revcounter0': 0, 'first': True, 'last': True}, 'field': <django.forms.boundfield.BoundField object at 0x7f0ce72258e0>}, {}, {}]
[27/Sep/2021 10:25:02] DEBUG [django.template:869] Exception while resolving variable 'error_text_inline' in template 'bootstrap/uni_form.html'.
Traceback (most recent call last):
  File "/home/kruecke/Projects/mpc-autofill-local-files/venv/lib/python3.8/site-packages/django/template/base.py", line 829, in _resolve_lookup
    current = current[bit]
  File "/home/kruecke/Projects/mpc-autofill-local-files/venv/lib/python3.8/site-packages/django/template/context.py", line 83, in __getitem__
    raise KeyError(key)
KeyError: 'error_text_inline'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/kruecke/Projects/mpc-autofill-local-files/venv/lib/python3.8/site-packages/django/template/base.py", line 835, in _resolve_lookup
    if isinstance(current, BaseContext) and getattr(type(current), bit):
AttributeError: type object 'Context' has no attribute 'error_text_inline'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/kruecke/Projects/mpc-autofill-local-files/venv/lib/python3.8/site-packages/django/template/base.py", line 843, in _resolve_lookup
    current = current[int(bit)]
ValueError: invalid literal for int() with base 10: 'error_text_inline'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/kruecke/Projects/mpc-autofill-local-files/venv/lib/python3.8/site-packages/django/template/base.py", line 848, in _resolve_lookup
    raise VariableDoesNotExist("Failed lookup for key "
django.template.base.VariableDoesNotExist: Failed lookup for key [error_text_inline] in [{'True': True, 'False': False, 'None': None}, {'True': True, 'False': False, 'None': None, 'field_class': '', 'field_template': 'bootstrap/field.html', 'form_show_errors': True, 'form_show_labels': True, 'label_class': '', 'form': <InputText bound=False, valid=False, fields=(card_list)>}, {'forloop': {'parentloop': {}, 'counter0': 0, 'counter': 1, 'revcounter': 1, 'revcounter0': 0, 'first': True, 'last': True}, 'field': <django.forms.boundfield.BoundField object at 0x7f0ce72258e0>}, {}, {}]
[27/Sep/2021 10:25:02] DEBUG [django.template:869] Exception while resolving variable 'help_text_inline' in template 'bootstrap/uni_form.html'.
Traceback (most recent call last):
  File "/home/kruecke/Projects/mpc-autofill-local-files/venv/lib/python3.8/site-packages/django/template/base.py", line 829, in _resolve_lookup
    current = current[bit]
  File "/home/kruecke/Projects/mpc-autofill-local-files/venv/lib/python3.8/site-packages/django/template/context.py", line 83, in __getitem__
    raise KeyError(key)
KeyError: 'help_text_inline'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/kruecke/Projects/mpc-autofill-local-files/venv/lib/python3.8/site-packages/django/template/base.py", line 835, in _resolve_lookup
    if isinstance(current, BaseContext) and getattr(type(current), bit):
AttributeError: type object 'Context' has no attribute 'help_text_inline'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/kruecke/Projects/mpc-autofill-local-files/venv/lib/python3.8/site-packages/django/template/base.py", line 843, in _resolve_lookup
    current = current[int(bit)]
ValueError: invalid literal for int() with base 10: 'help_text_inline'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/kruecke/Projects/mpc-autofill-local-files/venv/lib/python3.8/site-packages/django/template/base.py", line 848, in _resolve_lookup
    raise VariableDoesNotExist("Failed lookup for key "
django.template.base.VariableDoesNotExist: Failed lookup for key [help_text_inline] in [{'True': True, 'False': False, 'None': None}, {'True': True, 'False': False, 'None': None, 'field_class': '', 'field_template': 'bootstrap/field.html', 'form_show_errors': True, 'form_show_labels': True, 'label_class': '', 'form': <InputText bound=False, valid=False, fields=(card_list)>}, {'forloop': {'parentloop': {}, 'counter0': 0, 'counter': 1, 'revcounter': 1, 'revcounter0': 0, 'first': True, 'last': True}, 'field': <django.forms.boundfield.BoundField object at 0x7f0ce72258e0>}, {}, {}]
[27/Sep/2021 10:25:02] DEBUG [django.template:869] Exception while resolving variable 'tag' in template 'bootstrap/uni_form.html'.
Traceback (most recent call last):
  File "/home/kruecke/Projects/mpc-autofill-local-files/venv/lib/python3.8/site-packages/django/template/base.py", line 829, in _resolve_lookup
    current = current[bit]
  File "/home/kruecke/Projects/mpc-autofill-local-files/venv/lib/python3.8/site-packages/django/template/context.py", line 83, in __getitem__
    raise KeyError(key)
KeyError: 'tag'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/kruecke/Projects/mpc-autofill-local-files/venv/lib/python3.8/site-packages/django/template/base.py", line 835, in _resolve_lookup
    if isinstance(current, BaseContext) and getattr(type(current), bit):
AttributeError: type object 'Context' has no attribute 'tag'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/kruecke/Projects/mpc-autofill-local-files/venv/lib/python3.8/site-packages/django/template/base.py", line 843, in _resolve_lookup
    current = current[int(bit)]
ValueError: invalid literal for int() with base 10: 'tag'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/kruecke/Projects/mpc-autofill-local-files/venv/lib/python3.8/site-packages/django/template/base.py", line 848, in _resolve_lookup
    raise VariableDoesNotExist("Failed lookup for key "
django.template.base.VariableDoesNotExist: Failed lookup for key [tag] in [{'True': True, 'False': False, 'None': None}, {'True': True, 'False': False, 'None': None, 'field_class': '', 'field_template': 'bootstrap/field.html', 'form_show_errors': True, 'form_show_labels': True, 'label_class': '', 'form': <InputText bound=False, valid=False, fields=(card_list)>}, {'forloop': {'parentloop': {}, 'counter0': 0, 'counter': 1, 'revcounter': 1, 'revcounter0': 0, 'first': True, 'last': True}, 'field': <django.forms.boundfield.BoundField object at 0x7f0ce72258e0>}, {}]
[27/Sep/2021 10:25:02] DEBUG [django.template:869] Exception while resolving variable 'include_media' in template 'bootstrap/uni_form.html'.
Traceback (most recent call last):
  File "/home/kruecke/Projects/mpc-autofill-local-files/venv/lib/python3.8/site-packages/django/template/base.py", line 829, in _resolve_lookup
    current = current[bit]
  File "/home/kruecke/Projects/mpc-autofill-local-files/venv/lib/python3.8/site-packages/django/template/context.py", line 83, in __getitem__
    raise KeyError(key)
KeyError: 'include_media'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/kruecke/Projects/mpc-autofill-local-files/venv/lib/python3.8/site-packages/django/template/base.py", line 835, in _resolve_lookup
    if isinstance(current, BaseContext) and getattr(type(current), bit):
AttributeError: type object 'Context' has no attribute 'include_media'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/kruecke/Projects/mpc-autofill-local-files/venv/lib/python3.8/site-packages/django/template/base.py", line 843, in _resolve_lookup
    current = current[int(bit)]
ValueError: invalid literal for int() with base 10: 'include_media'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/kruecke/Projects/mpc-autofill-local-files/venv/lib/python3.8/site-packages/django/template/base.py", line 848, in _resolve_lookup
    raise VariableDoesNotExist("Failed lookup for key "
django.template.base.VariableDoesNotExist: Failed lookup for key [include_media] in [{'True': True, 'False': False, 'None': None}, {'True': True, 'False': False, 'None': None, 'field_class': '', 'field_template': 'bootstrap/field.html', 'form_show_errors': True, 'form_show_labels': True, 'label_class': '', 'form': <InputLink bound=False, valid=Unknown, fields=(list_url)>}]
[27/Sep/2021 10:25:02] DEBUG [django.template:869] Exception while resolving variable 'tag' in template 'bootstrap/uni_form.html'.
Traceback (most recent call last):
  File "/home/kruecke/Projects/mpc-autofill-local-files/venv/lib/python3.8/site-packages/django/template/base.py", line 829, in _resolve_lookup
    current = current[bit]
  File "/home/kruecke/Projects/mpc-autofill-local-files/venv/lib/python3.8/site-packages/django/template/context.py", line 83, in __getitem__
    raise KeyError(key)
KeyError: 'tag'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/kruecke/Projects/mpc-autofill-local-files/venv/lib/python3.8/site-packages/django/template/base.py", line 835, in _resolve_lookup
    if isinstance(current, BaseContext) and getattr(type(current), bit):
AttributeError: type object 'Context' has no attribute 'tag'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/kruecke/Projects/mpc-autofill-local-files/venv/lib/python3.8/site-packages/django/template/base.py", line 843, in _resolve_lookup
    current = current[int(bit)]
ValueError: invalid literal for int() with base 10: 'tag'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/kruecke/Projects/mpc-autofill-local-files/venv/lib/python3.8/site-packages/django/template/base.py", line 848, in _resolve_lookup
    raise VariableDoesNotExist("Failed lookup for key "
django.template.base.VariableDoesNotExist: Failed lookup for key [tag] in [{'True': True, 'False': False, 'None': None}, {'True': True, 'False': False, 'None': None, 'field_class': '', 'field_template': 'bootstrap/field.html', 'form_show_errors': True, 'form_show_labels': True, 'label_class': '', 'form': <InputLink bound=False, valid=False, fields=(list_url)>}, {'forloop': {'parentloop': {}, 'counter0': 0, 'counter': 1, 'revcounter': 1, 'revcounter0': 0, 'first': True, 'last': True}, 'field': <django.forms.boundfield.BoundField object at 0x7f0ce72c5160>}, {}]
[27/Sep/2021 10:25:02] DEBUG [django.template:869] Exception while resolving variable 'wrapper_class' in template 'bootstrap/uni_form.html'.
Traceback (most recent call last):
  File "/home/kruecke/Projects/mpc-autofill-local-files/venv/lib/python3.8/site-packages/django/template/base.py", line 829, in _resolve_lookup
    current = current[bit]
  File "/home/kruecke/Projects/mpc-autofill-local-files/venv/lib/python3.8/site-packages/django/template/context.py", line 83, in __getitem__
    raise KeyError(key)
KeyError: 'wrapper_class'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/kruecke/Projects/mpc-autofill-local-files/venv/lib/python3.8/site-packages/django/template/base.py", line 835, in _resolve_lookup
    if isinstance(current, BaseContext) and getattr(type(current), bit):
AttributeError: type object 'Context' has no attribute 'wrapper_class'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/kruecke/Projects/mpc-autofill-local-files/venv/lib/python3.8/site-packages/django/template/base.py", line 843, in _resolve_lookup
    current = current[int(bit)]
ValueError: invalid literal for int() with base 10: 'wrapper_class'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/kruecke/Projects/mpc-autofill-local-files/venv/lib/python3.8/site-packages/django/template/base.py", line 848, in _resolve_lookup
    raise VariableDoesNotExist("Failed lookup for key "
django.template.base.VariableDoesNotExist: Failed lookup for key [wrapper_class] in [{'True': True, 'False': False, 'None': None}, {'True': True, 'False': False, 'None': None, 'field_class': '', 'field_template': 'bootstrap/field.html', 'form_show_errors': True, 'form_show_labels': True, 'label_class': '', 'form': <InputLink bound=False, valid=False, fields=(list_url)>}, {'forloop': {'parentloop': {}, 'counter0': 0, 'counter': 1, 'revcounter': 1, 'revcounter0': 0, 'first': True, 'last': True}, 'field': <django.forms.boundfield.BoundField object at 0x7f0ce72c5160>}, {}]
[27/Sep/2021 10:25:02] DEBUG [django.template:869] Exception while resolving variable 'html5_required' in template 'bootstrap/uni_form.html'.
Traceback (most recent call last):
  File "/home/kruecke/Projects/mpc-autofill-local-files/venv/lib/python3.8/site-packages/django/template/base.py", line 829, in _resolve_lookup
    current = current[bit]
  File "/home/kruecke/Projects/mpc-autofill-local-files/venv/lib/python3.8/site-packages/django/template/context.py", line 83, in __getitem__
    raise KeyError(key)
KeyError: 'html5_required'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/kruecke/Projects/mpc-autofill-local-files/venv/lib/python3.8/site-packages/django/template/base.py", line 835, in _resolve_lookup
    if isinstance(current, BaseContext) and getattr(type(current), bit):
AttributeError: type object 'Context' has no attribute 'html5_required'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/kruecke/Projects/mpc-autofill-local-files/venv/lib/python3.8/site-packages/django/template/base.py", line 843, in _resolve_lookup
    current = current[int(bit)]
ValueError: invalid literal for int() with base 10: 'html5_required'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/kruecke/Projects/mpc-autofill-local-files/venv/lib/python3.8/site-packages/django/template/base.py", line 848, in _resolve_lookup
    raise VariableDoesNotExist("Failed lookup for key "
django.template.base.VariableDoesNotExist: Failed lookup for key [html5_required] in [{'True': True, 'False': False, 'None': None}, {'True': True, 'False': False, 'None': None, 'field_class': '', 'field_template': 'bootstrap/field.html', 'form_show_errors': True, 'form_show_labels': True, 'label_class': '', 'form': <InputLink bound=False, valid=False, fields=(list_url)>}, {'forloop': {'parentloop': {}, 'counter0': 0, 'counter': 1, 'revcounter': 1, 'revcounter0': 0, 'first': True, 'last': True}, 'field': <django.forms.boundfield.BoundField object at 0x7f0ce72c5160>}, {}]
[27/Sep/2021 10:25:02] DEBUG [django.template:869] Exception while resolving variable 'help_text_inline' in template 'bootstrap/uni_form.html'.
Traceback (most recent call last):
  File "/home/kruecke/Projects/mpc-autofill-local-files/venv/lib/python3.8/site-packages/django/template/base.py", line 829, in _resolve_lookup
    current = current[bit]
  File "/home/kruecke/Projects/mpc-autofill-local-files/venv/lib/python3.8/site-packages/django/template/context.py", line 83, in __getitem__
    raise KeyError(key)
KeyError: 'help_text_inline'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/kruecke/Projects/mpc-autofill-local-files/venv/lib/python3.8/site-packages/django/template/base.py", line 835, in _resolve_lookup
    if isinstance(current, BaseContext) and getattr(type(current), bit):
AttributeError: type object 'Context' has no attribute 'help_text_inline'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/kruecke/Projects/mpc-autofill-local-files/venv/lib/python3.8/site-packages/django/template/base.py", line 843, in _resolve_lookup
    current = current[int(bit)]
ValueError: invalid literal for int() with base 10: 'help_text_inline'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/kruecke/Projects/mpc-autofill-local-files/venv/lib/python3.8/site-packages/django/template/base.py", line 848, in _resolve_lookup
    raise VariableDoesNotExist("Failed lookup for key "
django.template.base.VariableDoesNotExist: Failed lookup for key [help_text_inline] in [{'True': True, 'False': False, 'None': None}, {'True': True, 'False': False, 'None': None, 'field_class': '', 'field_template': 'bootstrap/field.html', 'form_show_errors': True, 'form_show_labels': True, 'label_class': '', 'form': <InputLink bound=False, valid=False, fields=(list_url)>}, {'forloop': {'parentloop': {}, 'counter0': 0, 'counter': 1, 'revcounter': 1, 'revcounter0': 0, 'first': True, 'last': True}, 'field': <django.forms.boundfield.BoundField object at 0x7f0ce72c5160>}, {}, {}]
[27/Sep/2021 10:25:02] DEBUG [django.template:869] Exception while resolving variable 'error_text_inline' in template 'bootstrap/uni_form.html'.
Traceback (most recent call last):
  File "/home/kruecke/Projects/mpc-autofill-local-files/venv/lib/python3.8/site-packages/django/template/base.py", line 829, in _resolve_lookup
    current = current[bit]
  File "/home/kruecke/Projects/mpc-autofill-local-files/venv/lib/python3.8/site-packages/django/template/context.py", line 83, in __getitem__
    raise KeyError(key)
KeyError: 'error_text_inline'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/kruecke/Projects/mpc-autofill-local-files/venv/lib/python3.8/site-packages/django/template/base.py", line 835, in _resolve_lookup
    if isinstance(current, BaseContext) and getattr(type(current), bit):
AttributeError: type object 'Context' has no attribute 'error_text_inline'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/kruecke/Projects/mpc-autofill-local-files/venv/lib/python3.8/site-packages/django/template/base.py", line 843, in _resolve_lookup
    current = current[int(bit)]
ValueError: invalid literal for int() with base 10: 'error_text_inline'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/kruecke/Projects/mpc-autofill-local-files/venv/lib/python3.8/site-packages/django/template/base.py", line 848, in _resolve_lookup
    raise VariableDoesNotExist("Failed lookup for key "
django.template.base.VariableDoesNotExist: Failed lookup for key [error_text_inline] in [{'True': True, 'False': False, 'None': None}, {'True': True, 'False': False, 'None': None, 'field_class': '', 'field_template': 'bootstrap/field.html', 'form_show_errors': True, 'form_show_labels': True, 'label_class': '', 'form': <InputLink bound=False, valid=False, fields=(list_url)>}, {'forloop': {'parentloop': {}, 'counter0': 0, 'counter': 1, 'revcounter': 1, 'revcounter0': 0, 'first': True, 'last': True}, 'field': <django.forms.boundfield.BoundField object at 0x7f0ce72c5160>}, {}, {}]
[27/Sep/2021 10:25:02] DEBUG [django.template:869] Exception while resolving variable 'help_text_inline' in template 'bootstrap/uni_form.html'.
Traceback (most recent call last):
  File "/home/kruecke/Projects/mpc-autofill-local-files/venv/lib/python3.8/site-packages/django/template/base.py", line 829, in _resolve_lookup
    current = current[bit]
  File "/home/kruecke/Projects/mpc-autofill-local-files/venv/lib/python3.8/site-packages/django/template/context.py", line 83, in __getitem__
    raise KeyError(key)
KeyError: 'help_text_inline'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/kruecke/Projects/mpc-autofill-local-files/venv/lib/python3.8/site-packages/django/template/base.py", line 835, in _resolve_lookup
    if isinstance(current, BaseContext) and getattr(type(current), bit):
AttributeError: type object 'Context' has no attribute 'help_text_inline'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/kruecke/Projects/mpc-autofill-local-files/venv/lib/python3.8/site-packages/django/template/base.py", line 843, in _resolve_lookup
    current = current[int(bit)]
ValueError: invalid literal for int() with base 10: 'help_text_inline'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/kruecke/Projects/mpc-autofill-local-files/venv/lib/python3.8/site-packages/django/template/base.py", line 848, in _resolve_lookup
    raise VariableDoesNotExist("Failed lookup for key "
django.template.base.VariableDoesNotExist: Failed lookup for key [help_text_inline] in [{'True': True, 'False': False, 'None': None}, {'True': True, 'False': False, 'None': None, 'field_class': '', 'field_template': 'bootstrap/field.html', 'form_show_errors': True, 'form_show_labels': True, 'label_class': '', 'form': <InputLink bound=False, valid=False, fields=(list_url)>}, {'forloop': {'parentloop': {}, 'counter0': 0, 'counter': 1, 'revcounter': 1, 'revcounter0': 0, 'first': True, 'last': True}, 'field': <django.forms.boundfield.BoundField object at 0x7f0ce72c5160>}, {}, {}]
[27/Sep/2021 10:25:02] DEBUG [django.template:869] Exception while resolving variable 'tag' in template 'bootstrap/uni_form.html'.
Traceback (most recent call last):
  File "/home/kruecke/Projects/mpc-autofill-local-files/venv/lib/python3.8/site-packages/django/template/base.py", line 829, in _resolve_lookup
    current = current[bit]
  File "/home/kruecke/Projects/mpc-autofill-local-files/venv/lib/python3.8/site-packages/django/template/context.py", line 83, in __getitem__
    raise KeyError(key)
KeyError: 'tag'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/kruecke/Projects/mpc-autofill-local-files/venv/lib/python3.8/site-packages/django/template/base.py", line 835, in _resolve_lookup
    if isinstance(current, BaseContext) and getattr(type(current), bit):
AttributeError: type object 'Context' has no attribute 'tag'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/kruecke/Projects/mpc-autofill-local-files/venv/lib/python3.8/site-packages/django/template/base.py", line 843, in _resolve_lookup
    current = current[int(bit)]
ValueError: invalid literal for int() with base 10: 'tag'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/kruecke/Projects/mpc-autofill-local-files/venv/lib/python3.8/site-packages/django/template/base.py", line 848, in _resolve_lookup
    raise VariableDoesNotExist("Failed lookup for key "
django.template.base.VariableDoesNotExist: Failed lookup for key [tag] in [{'True': True, 'False': False, 'None': None}, {'True': True, 'False': False, 'None': None, 'field_class': '', 'field_template': 'bootstrap/field.html', 'form_show_errors': True, 'form_show_labels': True, 'label_class': '', 'form': <InputLink bound=False, valid=False, fields=(list_url)>}, {'forloop': {'parentloop': {}, 'counter0': 0, 'counter': 1, 'revcounter': 1, 'revcounter0': 0, 'first': True, 'last': True}, 'field': <django.forms.boundfield.BoundField object at 0x7f0ce72c5160>}, {}]

Any idea what's the problem here?

ValueError on Autofill.exe

5531C056-9C57-4D44-B045-D311A550D741

everything has been downloaded into the same folder... what’s gone awry?

the address mentioned is for a driver about 22 versions behind and navigating to the url doesn’t find a driver. Any help?

fetches all cards that include card's name as a substring

for some cards like, e.g., "Char," the site will fetch all cards that include the card's name as a substring. it would be nice in these cases to only get back variants of Char itself and not Esper Charm and Goblin Charbelcher.

Cannont sign in through Google

I've been trying to do the initial sign in step and each time I try to sign in I get this:

Sign in with Google temporarily disabled for this app
This app has not been verified yet by Google in order to use Google Sign In.

There is no "Advanced" option to click and bypass this, like in the video.

Website is down

https://mpcautofill.com has been returning 521 for a few days. I'm not sure what, if anything, I can do to assist, but I'm happy to help any way I can to preserve such a useful tool.

Option to select original card design (if exists) for all entries at once and/or some nice filters.

Hey, thank You for such a great tool! I just finished selecting images for 800+ cards I would like to order and I have found that I am doing the repetitive thing of clicking every item and selecting an original design for 95% of the cards. These original images are usually last ones, but this is not a rule. Would be nice to have an option to mass select originals for all cards if they exist + little filter to include/exclude community designs, alternate versions, other languages (mostly Japanese), special edition and so on.

Feature Request: Chrome Alternatives

I know this is probably a herculean task but it would be handy to be able to use something other than chrome. I have been using the Brave browser which is on the chrome architecture, I know the new edge is as well (for the few sad souls who use edge). I'm wondering if there would be a simple way to designate a different program to run this through and still have it function.

Automatic upload stall

Using the autofill program, it managed to download all the images but during upload, it only got to 17/489 (according to the cmd window, it had uploaded 18 to MPC), then it stopped. The debug.log file contained the following message:

[1129/233648.572:ERROR:directory_reader_win.cc(43)] FindFirstFile: The system cannot find the path specified. (0x3)

Here is a link with a pastebin of the entire cards.xml file
https://pastebin.com/8FtBk5V7

I had the autofill program in T:\Photoshop\ORDER (windows 10)

Stuck loading indefinitely

When using this program to upload to MPC it will get "stuck" on certain cards while trying to upload them. The image of the card will show as uploaded within the library, but the upload will continually try and upload the same card and never assign it to a card slot.

Step by step setup guide to run the app locally

It's not an issue, I know, but for more unexperienced people like myself it is really hard to setup the project without detailed instruction. I would be really thankful if the setup part could be more detailed and more like a step by step approach. Thank you in advance!

Script failure after downloading of images

Traceback (most recent call last):
  File "autofill.py", line 501, in <module>
  File "autofill.py", line 144, in fill_cards
  File "selenium/webdriver/remote/webdriver.py", line 636, in execute_script
  File "selenium/webdriver/remote/webdriver.py", line 321, in execute
  File "selenium/webdriver/remote/errorhandler.py", line 242, in check_response
selenium.common.exceptions.JavascriptException: Message: javascript error: Cannot set properties of null (setting 'value')
  (Session info: chrome=96.0.4664.55)

[8568] Failed to execute script autofill

Running fine after restarting the script.

image

[Feature Request] Printerstudio.com Compatibility

This may not be do-able since I know nothing about coding, but since Printer Studio has a pretty much identical UI to MPC (as well as being the same company in disguise as far as I understand it), it might be possible and therefore worth asking:

Could you give the tool compatibility with MPC's sister site printerstudio.com? This would be extremely useful since this is what some in EU/UK have used to get around large import tax/duties on purchases from MPC.

Of course fair enough if that'd be an unworkable task.

Cards not uploading

Version 83.0.4103.106 (Official Build) (64-bit)

Properly download all card images but only uploads one image then stalls.

Not sure how to proceed.

autofill (Mas OSX) / autofill.exe (Windows 10) failing on setup screen

Environment:

image

The following is an output of a second run after the initial run hung:

MPC Autofill initialising.
Successfully read XML file: cards.xml
Your order has a total of 102 cards, in the MPC bracket of up to 108 cards.
(S33) Superior Smooth cardstock (nonfoil).

Starting card downloader and webdriver processes.
DL: 100%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 104/104 [01:05<00:00,  1.58it/s]
Traceback (most recent call last):
  File "autofill.py", line 490, in <module>
  File "autofill.py", line 138, in fill_cards
  File ".venv\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 636, in execute_script
  File ".venv\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 321, in execute
  File ".venv\lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 242, in check_response
selenium.common.exceptions.JavascriptException: Message: javascript error: Cannot set properties of null (setting 'value')
  (Session info: chrome=95.0.4638.69)

[7892] Failed to execute script autofill

Some things I noticed:

  • Unless I'm reading the source code incorrectly, it seems I should be prompted to login def fill_cards so the project can be saved in case of a hung script - I am not getting that prompt requiring me to start from scratch every time the script fails.
  • Selenium seems to make it further if more time is given to download cards, which makes me suspect there may be a race condition in play here.
  • I work in both Windows and Mac OS environments and have had no luck in either running the released executables nor building from source (maybe I'm doing something wrong) making it hard for me to debug this issue myself :/

Issue with docker-compose

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?

Some issues with cardback field when using local images or the "-skipsetup" flag

For a recent order I wanted to do the following:

  1. Create an order using http://mpcfill.com/ with 551 cards.
  2. Use autofill.py normally to create an order on MPC and save the order.
  3. Generate an order with cards I made on my local computer using the script I made https://gist.github.com/axlan/21faf9c28b40904662124d20ff365f2b . The slots for the cards were generated to go from 551 to 611.
  4. Use autofill.py with the -skipsetup flag to create the combined order of 612 cards.

This almost worked but the way the XML cardback value is handled required me to do some manual intervention.

The problem stems from wanting to either:
a. Using a local file for the cardback.
b. Using -skipsetup with different cardbacks for the different parts of the order.

The first issue would be relatively straightforward to fix. Unlike the other cards, the cardback isn't cached and can only be specified by ID. This could be fixed by allowing an optional filename to be specified.

The second issue is a bit harder. Probably the easiest way would be to add more robust logic for "appending" to an order like I was doing here so that the offsets for the slots are handled automatically. This could be a different CLI flag, or just instructions for a better way to do this sort order.

Feature Request: Orders over 612 and/or multiple xml files at once

Feature Request 1:

It would be cool if an order file could contain over 612 items, and each additional order would just spill into a new "deck."

Additionally, it could be "intelligent" and divide up the numbers better too, but that's just a bonus

Feature Request 2:

Scanning all xml files in the adjacent / root directory and combining them

Alternatively, a script to combine them. Currently combining one at a time and then changing card backs by editing the XML in VS Code.

Thanks and love this software so much πŸ˜„

Reconsider finish modeling / Foil should not be selectable for P10 card stock.

Current handling of the combination of P10 and foil is not possible on the UI and causes the below described crash.

As an alternative, consider just modeling all the finishes allowed for each card stock and allowing the user to chose these directly as opposed to having a single toggle for foil which searches

Related driver code

if self.order.details.foil:

Your order has a total of 500 cards, in the MPC bracket of up to 504 cards.
(P10) Plastic cardstock (foil).
An uncaught exception occurred: Message: element not interactable: Element is not currently visible and may not be manipulated
  (Session info: chrome=XXX.X.XXXX.XXX)
Stacktrace:
Backtrace:
        Ordinal0 [0x00697413+2389011]
        Ordinal0 [0x00629F61+1941345]
        Ordinal0 [0x0051C658+837208]
        Ordinal0 [0x0051F064+847972]
        Ordinal0 [0x0051EF22+847650]
        Ordinal0 [0x0051F1B0+848304]
        Ordinal0 [0x0054CC05+1035269]
        Ordinal0 [0x0054051E+984350]
        Ordinal0 [0x0056414C+1130828]
        Ordinal0 [0x0053F974+981364]
        Ordinal0 [0x00564364+1131364]
        Ordinal0 [0x00574302+1196802]
        Ordinal0 [0x00563F66+1130342]
        Ordinal0 [0x0053E546+976198]
        Ordinal0 [0x0053F456+980054]
        GetHandleVerifier [0x00849632+1727522]
        GetHandleVerifier [0x008FBA4D+2457661]
        GetHandleVerifier [0x0072EB81+569713]
        GetHandleVerifier [0x0072DD76+566118]
        Ordinal0 [0x00630B2B+1968939]
        Ordinal0 [0x00635988+1989000]
        Ordinal0 [0x00635A75+1989237]
        Ordinal0 [0x0063ECB1+2026673]
        BaseThreadInitThunk [0x7687FA29+25]
        RtlGetAppContainerNamedObjectPath [0x76FD7A7E+286]
        RtlGetAppContainerNamedObjectPath [0x76FD7A4E+238]

Press Enter to exit.cTraceback (most recent call last):
  File "autofill.py", line 17, in main
  File "src\driver.py", line 348, in execute
  File "src\driver.py", line 255, in define_order
  File "selenium\webdriver\support\select.py", line 212, in _setSelected
  File "selenium\webdriver\remote\webelement.py", line 81, in click
  File "selenium\webdriver\remote\webelement.py", line 710, in _execute
  File "selenium\webdriver\remote\webdriver.py", line 425, in execute
  File "selenium\webdriver\remote\errorhandler.py", line 247, in check_response

Sorry in advance for not following any issue template, I tried to find guidance but likely missed it.

Problems with CSV upload if you remove header row

I encountered an issue with the CSV upload functionality on the main site.

I tried uploading the following CSV file, and was met with a 500 Server Error message

1,Plains,Island
1,Swamp,Mountain

I then tried a simpler version, which didn't give an error, but took me to the card selection page, with no cards loaded:

1,Plains,Island

Eventually, I realized I have to keep the header row in the CSV for the upload to work. I think it might be worth mentioning in the document, so other people don't do the same mistake. Or have a more informative error page, should you upload something incorrect.


Steps to reproduce:

  1. Download the csv template of the site
  2. Open the csv file, and edit it to contain either of the examples above.
  3. Save and close the csv file
  4. Upload the csv file using the "Upload CSV" button

Pick high DPI images by default

When printing hundreds of cards, it gets tiring to have to click through the images to get to the higher-DPI images. Is there any way to order the images by DPI by default?

The search index CardSearch does not exist...

Hi everyone! The docker setup works like a charm, thank you for that. But I have a small problem. I've added some drives which are also correctly displayed. But when I perform a search I get the following error:

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!"

I've tried to run python3 manage.py update_database but got an error.

Could this be an issue with a wrong Setup of the Google Service Account?

Exception(s) when resuming order using --skipsetup

I posted about this on Discord, but the explanation started to become so long winded I felt it was better to move it here instead.

My first attempt at running the program stalled out after ~300 cards in a 396 order. So I saved the project, and then re-ran autofill with the --skipsetup flag. In the Chrome window that was launched, I logged in to MPC, went to the saved project and then resumed the program. As expected, the program filled out the remaining card slots. However, once the program had filled all slots, it threw an exception:

The program has been started with --skipsetup, which will continue
uploading cards to an existing project. Please sign in to MPC and select an existing project
to continue editing. Once you've signed in and have entered the MPC project editor, return to
the console window and press Enter.

An uncaught exception occurred: Message: javascript error: displayTotalCount is not defined
  (Session info: chrome=102.0.5005.115)
Stacktrace:
Backtrace:
        Ordinal0 [0x00DBD953+2414931]
        Ordinal0 [0x00D4F5E1+1963489]
        Ordinal0 [0x00C3C6B8+837304]
        Ordinal0 [0x00C3F0B4+848052]
        Ordinal0 [0x00C3EF72+847730]
        Ordinal0 [0x00C3F8EA+850154]
        Ordinal0 [0x00C95249+1200713]
        Ordinal0 [0x00C8449C+1131676]
        Ordinal0 [0x00C94812+1198098]
        Ordinal0 [0x00C842B6+1131190]
        Ordinal0 [0x00C5E860+976992]
        Ordinal0 [0x00C5F756+980822]
        GetHandleVerifier [0x0102CC62+2510274]
        GetHandleVerifier [0x0101F760+2455744]
        GetHandleVerifier [0x00E4EABA+551962]
        GetHandleVerifier [0x00E4D916+547446]
        Ordinal0 [0x00D55F3B+1990459]
        Ordinal0 [0x00D5A898+2009240]
        Ordinal0 [0x00D5A985+2009477]
        Ordinal0 [0x00D63AD1+2046673]
        BaseThreadInitThunk [0x76CEFA29+25]
        RtlGetAppContainerNamedObjectPath [0x77597A9E+286]
        RtlGetAppContainerNamedObjectPath [0x77597A6E+238]

Press Enter to exit.

So I saved the project again, and went through the motions once more (run program, log in, open saved project). The program tried to navigate to the "Customize Fronts" page and was trying to brining up the "Chose card number" prompt, but eventually timed out after 300 seconds and threw another exception (unfortunately I didn't capture that exception). The timeout I could kinda understand. Loading the Customize Fronts page takes a lot of time here in northern EU, so all card thumbnails aren't loaded in 5 minutes.

So once more, I started the program (with --skipsetup). This time, I opened the saved project, and manually navigated to the "Customize Fronts" page and left it there for a good 15 minutes until the page was fully loaded. I even reloaded the page to make sure all the images were locally cached. Then, I moved the page to the "Customize Backs" page, and resumed autofill. The program now correctly navigated to the "Customize Fronts" page first, showed the "card number" prompt, closed it, did some processing (I guess it checked that all slots were filled), and then proceeded to "Customize Backs" and started uploading and filling in cards as it should.


So I think there are several things going on here:

The first issue I don't know what's up with. I tried to replicate it several times, with different order files and by terminating the process and resuming it several times without luck. Might have been a one-off, or something on MPCs side.

The other is that each instance of Chrome spawned from autofill has it's own cache, so loaded pages takes a very long time. I am not sure it is possible to reuse caches between runs, so if it aren't I think just extending the time you allow on the first render. Another alternative would be to have the program open the "Customize Fronts" page and let it fully load, then open the "Customize Backs" and let it fully load, then start the process over, to ensure previous images are cached.

Sorry for the long write-up without having any success replicating the issue. Hope it's somewhat useful, but if it seems like pure noise you are free to close it. Thanks again for a great program.

duplicate key value violates unique constraint "cardpicker_token_pkey"

Hey. Anyone knows what this error is about? I don't know exactly how it happens, and it seems kind of random to me.
This is the output from docker-compose logs -f django:

django_1         | Finished crawling Male MPC Drive as of 1/31/2021.
django_1         | Traceback (most recent call last):
django_1         |   File "/usr/local/lib/python3.8/dist-packages/django/db/backends/utils.py", line 84, in _execute
django_1         |     return self.cursor.execute(sql, params)
django_1         | psycopg2.errors.UniqueViolation: duplicate key value violates unique constraint "cardpicker_token_pkey"
django_1         | DETAIL:  Key (id)=(1fcNPOh0ijnEEDcD7rC5m5M9klJ9k3W5M) already exists.
django_1         |
django_1         |
django_1         | The above exception was the direct cause of the following exception:
django_1         |
django_1         | Traceback (most recent call last):
django_1         |   File "manage.py", line 21, in <module>
django_1         |     main()
django_1         |   File "manage.py", line 17, in main
django_1         |     execute_from_command_line(sys.argv)
django_1         |   File "/usr/local/lib/python3.8/dist-packages/django/core/management/__init__.py", line 419, in execute_from_command_line
django_1         |     utility.execute()
django_1         |   File "/usr/local/lib/python3.8/dist-packages/django/core/management/__init__.py", line 413, in execute
django_1         |     self.fetch_command(subcommand).run_from_argv(self.argv)
django_1         |   File "/usr/local/lib/python3.8/dist-packages/django/core/management/base.py", line 354, in run_from_argv
django_1         |     self.execute(*args, **cmd_options)
django_1         |   File "/usr/local/lib/python3.8/dist-packages/django/core/management/base.py", line 398, in execute
django_1         |     output = self.handle(*args, **options)
django_1         |   File "/MPCAutofill/MPCAutofill/cardpicker/management/commands/update_database.py", line 348, in handle
django_1         |     search_folder(service, Source.objects.get(id=x), sources[x])
django_1         |   File "/MPCAutofill/MPCAutofill/cardpicker/management/commands/update_database.py", line 190, in search_folder
django_1         |     x[1].objects.bulk_create(x[0])
django_1         |   File "/usr/local/lib/python3.8/dist-packages/django/db/models/manager.py", line 85, in manager_method
django_1         |     return getattr(self.get_queryset(), name)(*args, **kwargs)
django_1         |   File "/usr/local/lib/python3.8/dist-packages/django/db/models/query.py", line 502, in bulk_create
django_1         |     returned_columns = self._batched_insert(
django_1         |   File "/usr/local/lib/python3.8/dist-packages/django/db/models/query.py", line 1287, in _batched_insert
django_1         |     inserted_rows.extend(self._insert(
django_1         |   File "/usr/local/lib/python3.8/dist-packages/django/db/models/query.py", line 1270, in _insert
django_1         |     return query.get_compiler(using=using).execute_sql(returning_fields)
django_1         |   File "/usr/local/lib/python3.8/dist-packages/django/db/models/sql/compiler.py", line 1416, in execute_sql
django_1         |     cursor.execute(sql, params)
django_1         |   File "/usr/local/lib/python3.8/dist-packages/django/db/backends/utils.py", line 66, in execute
django_1         |     return self._execute_with_wrappers(sql, params, many=False, executor=self._execute)
django_1         |   File "/usr/local/lib/python3.8/dist-packages/django/db/backends/utils.py", line 75, in _execute_with_wrappers
django_1         |     return executor(sql, params, many, context)
django_1         |   File "/usr/local/lib/python3.8/dist-packages/django/db/backends/utils.py", line 84, in _execute
django_1         |     return self.cursor.execute(sql, params)
django_1         |   File "/usr/local/lib/python3.8/dist-packages/django/db/utils.py", line 90, in __exit__
django_1         |     raise dj_exc_value.with_traceback(traceback) from exc_value
django_1         |   File "/usr/local/lib/python3.8/dist-packages/django/db/backends/utils.py", line 84, in _execute
django_1         |     return self.cursor.execute(sql, params)
django_1         | django.db.utils.IntegrityError: duplicate key value violates unique constraint "cardpicker_token_pkey"
django_1         | DETAIL:  Key (id)=(1fcNPOh0ijnEEDcD7rC5m5M9klJ9k3W5M) already exists.
django_1         |
docker_django_1 exited with code 1

Any help is appreciated!

As an autofill user with a large order, I would like to be able to pause and resume uploads.

As a user uploading 400+ cards, inevitably my internet goes down during the several hour upload process. This ruins the order. Currently I cannot actually use the autofill script to successfully fill large orders.

In order to fulfill large orders, I propose a new feature, where the autofill script first checks to see if a card slot is already filled. If it's filled, then the script will not re-upload the card for that slot. In this manner, the script can quickly "catch up" to where previous executions had left off.

This feature would allow the user to both save mid-project, as well as put their computer to sleep and take several days to complete a large order upload.

Allow adding a name variable for cardback selection

Oops that hitting enter too soon.

Right now card backs are determined in cards.xml by the tag alone. This makes it either difficult or just troublesome to use local image files for custom cardbacks with the autofill app. Allowing adding a tag inside of would be a cleaner way to just dictate a local filename to be used for a cardback if someone doing a more custom order setup required it.

Images not found

Hey guys, I got the web app up and running locally, but it can't find any images when I submit the cards.

Am I right in understanding that the Google Drive folders I provide need to contain those images? If so, is there a public drive available that already has the images? If not, how do I go about acquiring those images?

Thanks,
Derek

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.