pc-coholic / pretix-googlepaypasses

[Work in Progress] Support for Google Pay Passes/Walletobjects in pretix
Other
2 stars 1 forks source link

Failure to install - Fails to build wheel #1

Closed bonzi closed 6 years ago

bonzi commented 6 years ago

Hi there,

I tried to install the plugin but it failed to install when building wheels, I am using Python 3.6 in a venv. Any help will be greatly appreciated

python --version
Python 3.6.7

pip --version
pip 18.1 from /var/pretix/venv/lib/python3.6/site-packages/pip (python 3.6)

My errors are as follows,

pretix@baguette:~$ pip3 install git+https://github.com/pc-coholic/pretix-googlepaypasses.git
\Collecting git+https://github.com/pc-coholic/pretix-googlepaypasses.git
  Cloning https://github.com/pc-coholic/pretix-googlepaypasses.git to /tmp/pip-req-build-bjkqxje2
Requirement already satisfied: google-auth in ./venv/lib/python3.6/site-packages (from pretix-googlepaypasses==1.0.0) (1.5.1)
Requirement already satisfied: googlemaps in ./venv/lib/python3.6/site-packages (from pretix-googlepaypasses==1.0.0) (3.0.2)
Requirement already satisfied: pyasn1-modules>=0.2.1 in ./venv/lib/python3.6/site-packages (from google-auth->pretix-googlepaypasses==1.0.0) (0.2.2)
Requirement already satisfied: rsa>=3.1.4 in ./venv/lib/python3.6/site-packages (from google-auth->pretix-googlepaypasses==1.0.0) (4.0)
Requirement already satisfied: six>=1.9.0 in ./venv/lib/python3.6/site-packages (from google-auth->pretix-googlepaypasses==1.0.0) (1.11.0)
Requirement already satisfied: cachetools>=2.0.0 in ./venv/lib/python3.6/site-packages (from google-auth->pretix-googlepaypasses==1.0.0) (2.1.0)
Requirement already satisfied: requests<3.0,>=2.11.1 in ./venv/lib/python3.6/site-packages (from googlemaps->pretix-googlepaypasses==1.0.0) (2.20.0)
Requirement already satisfied: pyasn1<0.5.0,>=0.4.1 in ./venv/lib/python3.6/site-packages (from pyasn1-modules>=0.2.1->google-auth->pretix-googlepaypasses==1.0.0) (0.4.4)
Requirement already satisfied: certifi>=2017.4.17 in ./venv/lib/python3.6/site-packages (from requests<3.0,>=2.11.1->googlemaps->pretix-googlepaypasses==1.0.0) (2018.10.15)
Requirement already satisfied: urllib3<1.25,>=1.21.1 in ./venv/lib/python3.6/site-packages (from requests<3.0,>=2.11.1->googlemaps->pretix-googlepaypasses==1.0.0) (1.24)
Requirement already satisfied: chardet<3.1.0,>=3.0.2 in ./venv/lib/python3.6/site-packages (from requests<3.0,>=2.11.1->googlemaps->pretix-googlepaypasses==1.0.0) (3.0.4)
Requirement already satisfied: idna<2.8,>=2.5 in ./venv/lib/python3.6/site-packages (from requests<3.0,>=2.11.1->googlemaps->pretix-googlepaypasses==1.0.0) (2.6)
Building wheels for collected packages: pretix-googlepaypasses
  Running setup.py bdist_wheel for pretix-googlepaypasses ... error
  Complete output from command /var/pretix/venv/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-req-build-bjkqxje2/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /tmp/pip-wheel-j0ovkfr2 --python-tag cp36:
  running bdist_wheel
  running build
  Traceback (most recent call last):
    File "<string>", line 1, in <module>
    File "/tmp/pip-req-build-bjkqxje2/setup.py", line 42, in <module>
      """,
    File "/var/pretix/venv/lib/python3.6/site-packages/setuptools/__init__.py", line 140, in setup
      return distutils.core.setup(**attrs)
    File "/usr/lib/python3.6/distutils/core.py", line 148, in setup
      dist.run_commands()
    File "/usr/lib/python3.6/distutils/dist.py", line 955, in run_commands
      self.run_command(cmd)
    File "/usr/lib/python3.6/distutils/dist.py", line 974, in run_command
      cmd_obj.run()
    File "/var/pretix/venv/lib/python3.6/site-packages/wheel/bdist_wheel.py", line 188, in run
      self.run_command('build')
    File "/usr/lib/python3.6/distutils/cmd.py", line 313, in run_command
      self.distribution.run_command(command)
    File "/usr/lib/python3.6/distutils/dist.py", line 974, in run_command
      cmd_obj.run()
    File "/tmp/pip-req-build-bjkqxje2/setup.py", line 17, in run
      management.call_command('compilemessages', verbosity=1, interactive=False)
    File "/var/pretix/venv/lib/python3.6/site-packages/django/core/management/__init__.py", line 140, in call_command
      ', '.join(sorted(valid_options)),
  TypeError: Unknown option(s) for compilemessages command: interactive. Valid options are: exclude, fuzzy, help, locale, no_color, pythonpath, settings, skip_checks, stderr, stdout, traceback, use_fuzzy, verbosity, version.

  ----------------------------------------
  Failed building wheel for pretix-googlepaypasses
  Running setup.py clean for pretix-googlepaypasses
Failed to build pretix-googlepaypasses
Installing collected packages: pretix-googlepaypasses
  Running setup.py install for pretix-googlepaypasses ... error
    Complete output from command /var/pretix/venv/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-req-build-bjkqxje2/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-record-1puoji3l/install-record.txt --single-version-externally-managed --compile --install-headers /var/pretix/venv/include/site/python3.6/pretix-googlepaypasses:
    running install
    running build
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-req-build-bjkqxje2/setup.py", line 42, in <module>
        """,
      File "/var/pretix/venv/lib/python3.6/site-packages/setuptools/__init__.py", line 140, in setup
        return distutils.core.setup(**attrs)
      File "/usr/lib/python3.6/distutils/core.py", line 148, in setup
        dist.run_commands()
      File "/usr/lib/python3.6/distutils/dist.py", line 955, in run_commands
        self.run_command(cmd)
      File "/usr/lib/python3.6/distutils/dist.py", line 974, in run_command
        cmd_obj.run()
      File "/var/pretix/venv/lib/python3.6/site-packages/setuptools/command/install.py", line 61, in run
        return orig.install.run(self)
      File "/usr/lib/python3.6/distutils/command/install.py", line 589, in run
        self.run_command('build')
      File "/usr/lib/python3.6/distutils/cmd.py", line 313, in run_command
        self.distribution.run_command(command)
      File "/usr/lib/python3.6/distutils/dist.py", line 974, in run_command
        cmd_obj.run()
      File "/tmp/pip-req-build-bjkqxje2/setup.py", line 17, in run
        management.call_command('compilemessages', verbosity=1, interactive=False)
      File "/var/pretix/venv/lib/python3.6/site-packages/django/core/management/__init__.py", line 140, in call_command
        ', '.join(sorted(valid_options)),
    TypeError: Unknown option(s) for compilemessages command: interactive. Valid options are: exclude, fuzzy, help, locale, no_color, pythonpath, settings, skip_checks, stderr, stdout, traceback, use_fuzzy, verbosity, version.

    ----------------------------------------
Command "/var/pretix/venv/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-req-build-bjkqxje2/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-record-1puoji3l/install-record.txt --single-version-externally-managed --compile --install-headers /var/pretix/venv/include/site/python3.6/pretix-googlepaypasses" failed with error code 1 in /tmp/pip-req-build-bjkqxje2/
(venv) pretix@baguette:~$
bonzi commented 6 years ago

After installing manually by cloning and running setup.py install it stated the walletobjects module was not installed, I'm guessing it is referring to this, currently empty repo

pc-coholic commented 6 years ago

Hello!

You pretty much already figured it out correctly - without the walletobjects-repo this is not working yet.

There are still a number of issues with this plugin which make it not a good choice for production use - hence also the disclaimer on the plugin's README. I will however push a Work-In-Progress version of the walletobjects.

The wheel-thing is an unrelated issue with Django 2.0 compatibility - I pushed a fix for that.

Please feel free to test the plugin if you want - but I cannot stress enough how I do not recommend using it for production use at this point.

bonzi commented 6 years ago

Thanks for pushing a WIP walletobjects. This won't be going in to production as of yet (Not until it becomes "stable")

I'll report back my success, or lack thereof.

bonzi commented 6 years ago

When using the preview ticket option I get this Dijango error

ERROR 2018-10-31 15:03:48,024 django.request log Internal Server Error: /control/event/LordBonzi/rulzc/settings/tickets/preview/googlepaypasses
Traceback (most recent call last):
  File "/var/pretix/venv/lib/python3.6/site-packages/django/core/handlers/exception.py", line 34, in inner
    response = get_response(request)
  File "/var/pretix/venv/lib/python3.6/site-packages/django/core/handlers/base.py", line 126, in _get_response
    response = self.process_exception_by_middleware(e, request)
  File "/var/pretix/venv/lib/python3.6/site-packages/django/core/handlers/base.py", line 124, in _get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "/var/pretix/venv/lib/python3.6/site-packages/pretix/control/permissions.py", line 27, in wrapper
    return function(request, *args, **kw)
  File "/var/pretix/venv/lib/python3.6/site-packages/django/views/generic/base.py", line 68, in view
    return self.dispatch(request, *args, **kwargs)
  File "/var/pretix/venv/lib/python3.6/site-packages/django/views/generic/base.py", line 88, in dispatch
    return handler(request, *args, **kwargs)
  File "/var/pretix/venv/lib/python3.6/site-packages/pretix/control/views/event.py", line 670, in get
    fname, mimet, data = tickets.preview(self.request.event.pk, self.output.identifier)
  File "/var/pretix/venv/lib/python3.6/site-packages/pretix/base/services/tickets.py", line 100, in preview
    return prov.generate(p)
  File "/var/pretix/venv/lib/python3.6/site-packages/pretix_googlepaypasses-1.0.0-py3.6.egg/pretix_googlepaypasses/googlepaypasses.py", line 98, in generate
    tpl_html = get_template('pretix_googlepaypasses/downloadfallback.html')
  File "/var/pretix/venv/lib/python3.6/site-packages/django/template/loader.py", line 19, in get_template
    raise TemplateDoesNotExist(template_name, chain=chain)
django.template.exceptions.TemplateDoesNotExist: pretix_googlepaypasses/downloadfallback.html
ERROR 2018-10-31 15:03:48,024 django.request log Internal Server Error: /control/event/LordBonzi/rulzc/settings/tickets/preview/googlepaypasses
Traceback (most recent call last):
  File "/var/pretix/venv/lib/python3.6/site-packages/django/core/handlers/exception.py", line 34, in inner
    response = get_response(request)
  File "/var/pretix/venv/lib/python3.6/site-packages/django/core/handlers/base.py", line 126, in _get_response
    response = self.process_exception_by_middleware(e, request)
  File "/var/pretix/venv/lib/python3.6/site-packages/django/core/handlers/base.py", line 124, in _get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "/var/pretix/venv/lib/python3.6/site-packages/pretix/control/permissions.py", line 27, in wrapper
    return function(request, *args, **kw)
  File "/var/pretix/venv/lib/python3.6/site-packages/django/views/generic/base.py", line 68, in view
    return self.dispatch(request, *args, **kwargs)
  File "/var/pretix/venv/lib/python3.6/site-packages/django/views/generic/base.py", line 88, in dispatch
    return handler(request, *args, **kwargs)
  File "/var/pretix/venv/lib/python3.6/site-packages/pretix/control/views/event.py", line 670, in get
    fname, mimet, data = tickets.preview(self.request.event.pk, self.output.identifier)
  File "/var/pretix/venv/lib/python3.6/site-packages/pretix/base/services/tickets.py", line 100, in preview
    return prov.generate(p)
  File "/var/pretix/venv/lib/python3.6/site-packages/pretix_googlepaypasses-1.0.0-py3.6.egg/pretix_googlepaypasses/googlepaypasses.py", line 98, in generate
    tpl_html = get_template('pretix_googlepaypasses/downloadfallback.html')
  File "/var/pretix/venv/lib/python3.6/site-packages/django/template/loader.py", line 19, in get_template
    raise TemplateDoesNotExist(template_name, chain=chain)
django.template.exceptions.TemplateDoesNotExist: pretix_googlepaypasses/downloadfallback.html

When testing it with a "real" (Brought via shop) ticket I get this

ERROR 2018-10-31 15:37:15,932 django.request log Internal Server Error: /LordBonzi/rulzc/order/order/secret/
Traceback (most recent call last):
  File "/var/pretix/venv/lib/python3.6/site-packages/django/template/backends/django.py", line 61, in render
    return self.template.render(context)
  File "/var/pretix/venv/lib/python3.6/site-packages/django/template/base.py", line 169, in render
    with context.bind_template(self):
  File "/usr/lib/python3.6/contextlib.py", line 81, in __enter__                              return next(self.gen)
  File "/var/pretix/venv/lib/python3.6/site-packages/django/template/context.py", line 246, in bind_template
    updates.update(processor(self.request))
  File "/var/pretix/venv/lib/python3.6/site-packages/pretix/presale/context.py", line 46, in contextprocessor
    for receiver, response in html_head.send(request.event, request=request):
  File "/var/pretix/venv/lib/python3.6/site-packages/pretix/base/signals.py", line 70, in send
    response = receiver(signal=self, sender=sender, **named)
  File "/var/pretix/venv/lib/python3.6/site-packages/pretix_googlepaypasses-1.0.0-py3.6.egg/pretix_googlepaypasses/signals.py", line 60, in html_head_presale
    template = get_template('pretix_googlepaypasses/presale_head.html')
  File "/var/pretix/venv/lib/python3.6/site-packages/django/template/loader.py", line 19, in get_template
    raise TemplateDoesNotExist(template_name, chain=chain)
django.template.exceptions.TemplateDoesNotExist: pretix_googlepaypasses/presale_head.html

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/var/pretix/venv/lib/python3.6/site-packages/django/core/handlers/exception.py", line 34, in inner
    response = get_response(request)
  File "/var/pretix/venv/lib/python3.6/site-packages/django/core/handlers/base.py", line 156, in _get_response
    response = self.process_exception_by_middleware(e, request)
  File "/var/pretix/venv/lib/python3.6/site-packages/django/core/handlers/base.py", line 154, in _get_response
    response = response.render()
  File "/var/pretix/venv/lib/python3.6/site-packages/django/template/response.py", line 106, in render
    self.content = self.rendered_content
  File "/var/pretix/venv/lib/python3.6/site-packages/django/template/response.py", line 83, in rendered_content
    content = template.render(context, self._request)
  File "/var/pretix/venv/lib/python3.6/site-packages/django/template/backends/django.py", line 63, in render
    reraise(exc, self.backend)
  File "/var/pretix/venv/lib/python3.6/site-packages/django/template/backends/django.py", line 84, in reraise
    raise new from exc
django.template.exceptions.TemplateDoesNotExist: pretix_googlepaypasses/presale_head.html
ERROR 2018-10-31 15:37:15,932 django.request log Internal Server Error: /LordBonzi/rulzc/order/order/secret/
Traceback (most recent call last):
  File "/var/pretix/venv/lib/python3.6/site-packages/django/template/backends/django.py", line 61, in render
    return self.template.render(context)
  File "/var/pretix/venv/lib/python3.6/site-packages/django/template/base.py", line 169, in render
    with context.bind_template(self):
  File "/usr/lib/python3.6/contextlib.py", line 81, in __enter__
    return next(self.gen)
  File "/var/pretix/venv/lib/python3.6/site-packages/django/template/context.py", line 246, in bind_template
    updates.update(processor(self.request))
  File "/var/pretix/venv/lib/python3.6/site-packages/pretix/presale/context.py", line 46, in contextprocessor
    for receiver, response in html_head.send(request.event, request=request):
  File "/var/pretix/venv/lib/python3.6/site-packages/pretix/base/signals.py", line 70, in send
    response = receiver(signal=self, sender=sender, **named)
  File "/var/pretix/venv/lib/python3.6/site-packages/pretix_googlepaypasses-1.0.0-py3.6.egg/pretix_googlepaypasses/signals.py", line 60, in html_head_presale
    template = get_template('pretix_googlepaypasses/presale_head.html')
  File "/var/pretix/venv/lib/python3.6/site-packages/django/template/loader.py", line 19, in get_template
    raise TemplateDoesNotExist(template_name, chain=chain)
django.template.exceptions.TemplateDoesNotExist: pretix_googlepaypasses/presale_head.html

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/var/pretix/venv/lib/python3.6/site-packages/django/core/handlers/exception.py", line 34, in inner
    response = get_response(request)
  File "/var/pretix/venv/lib/python3.6/site-packages/django/core/handlers/base.py", line 156, in _get_response
    response = self.process_exception_by_middleware(e, request)
  File "/var/pretix/venv/lib/python3.6/site-packages/django/core/handlers/base.py", line 154, in _get_response
    response = response.render()
  File "/var/pretix/venv/lib/python3.6/site-packages/django/template/response.py", line 106, in render
    self.content = self.rendered_content
  File "/var/pretix/venv/lib/python3.6/site-packages/django/template/response.py", line 83, in rendered_content
    content = template.render(context, self._request)
  File "/var/pretix/venv/lib/python3.6/site-packages/django/template/backends/django.py", line 63, in render
    reraise(exc, self.backend)
  File "/var/pretix/venv/lib/python3.6/site-packages/django/template/backends/django.py", line 84, in reraise
    raise new from exc
django.template.exceptions.TemplateDoesNotExist: pretix_googlepaypasses/presale_head.html
pc-coholic commented 6 years ago

I do not know, why the template is not found - but even if it was found, so far the Preview-Feature is not properly implemented yet.

Some technical background:

A regular ticketgenerator-plugin has a generate()-method, that takes an orderPosition as parameter and returns the generated ticket for the passed position. When you click the download-button in the frontend, <url of the order>/<orderposition>/<generatorname> is navigated to, and the above generate()-function is called, and you get your ticket. If you click on the preview-button in the backend, the function is called but a fake orderPosition is passed.

However, this plugin is doing things a little bit different in order to allow participants to give informed consent before having their data transmitted to Google.

The generate()-function for this plugin is generally not being called except as a fallback. In the frontend, clicks on the Download-Button are being rewritten to display a modal message that includes a button to <url of the order>/<orderposition>/googlepaypasses/generate (instead of the original <url of the order>/<orderposition>/googlepaypasses. Calling the URL without the /generate will show the consent-message, assuming that the user hasn't seen it (disabled Javascript, etc.).

That means, that we're pretty much ignoring whatever orderPosition is passed to generate(). Only when calling /generate, we extract the orderPosition from the URL, generate the pass and return it to the user.

So this is also the reason, why the preview-feature wouldn't work - even if the template was found: we would only return a HTML-file with the consent-message, linking to a /generate that won't be doing anything.

Long story, short: As of now, if you want to see a pass, you have to generate it through the frontend.

But see - that's one of the reasons I was reluctant to upload all the resources to have this half-done plugin run into this kind of issues ;)

bonzi commented 6 years ago

Hi again,

I understand you reluctance to release the plugin, But after all, Isn't documenting your issues always good in-case others try to attempt to """"test"""" the plugin :yum:

As it turns out, these errors may be my own fault as the venv site-packages folder did not have the required plugin folders necessary, Note to self, Just use pip, save yourself the hassle.

The plugin seems to work - eg it installed, can be enabled and shows up on the order page and displays the Privacy Notice, However once clicking the "Add to Pay" button it sends a JSON error message

{"status": "error"}

No doubt this would be caused by some error on my part. Do you have an example of how to fill out the events settings page for the plugin?

Thanks

bonzi commented 6 years ago

Also, When trying to save values for the plugins settings, It gives an error stating AttributeError: 'bool' object has no attribute 'get'

The full log is as follows

ERROR 2018-10-31 17:57:43,924 django.request log Internal Server Error: /control/event/LordBonzi/rulzc/settings/tickets
Traceback (most recent call last):
  File "/var/pretix/venv/lib/python3.6/site-packages/django/core/handlers/exception.py", line 34, in inner
    response = get_response(request)
  File "/var/pretix/venv/lib/python3.6/site-packages/django/core/handlers/base.py", line 126, in _get_response
    response = self.process_exception_by_middleware(e, request)
  File "/var/pretix/venv/lib/python3.6/site-packages/django/core/handlers/base.py", line 124, in _get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "/var/pretix/venv/lib/python3.6/site-packages/pretix/control/permissions.py", line 27, in wrapper
    return function(request, *args, **kw)
  File "/var/pretix/venv/lib/python3.6/site-packages/django/views/generic/base.py", line 68, in view
    return self.dispatch(request, *args, **kwargs)
  File "/var/pretix/venv/lib/python3.6/site-packages/django/views/generic/base.py", line 88, in dispatch
    return handler(request, *args, **kwargs)
  File "/usr/lib/python3.6/contextlib.py", line 52, in inner
    return func(*args, **kwds)
  File "/var/pretix/venv/lib/python3.6/site-packages/pretix/control/views/event.py", line 735, in post
    for k in provider.form.changed_data
  File "/var/pretix/venv/lib/python3.6/site-packages/pretix/base/models/base.py", line 80, in log_action
    logentry.save()
  File "/var/pretix/venv/lib/python3.6/site-packages/django/db/models/base.py", line 718, in save
    force_update=force_update, update_fields=update_fields)
  File "/var/pretix/venv/lib/python3.6/site-packages/django/db/models/base.py", line 758, in save_base
    update_fields=update_fields, raw=raw, using=using,
  File "/var/pretix/venv/lib/python3.6/site-packages/django/dispatch/dispatcher.py", line 175, in send
    for receiver in self._live_receivers(sender)
  File "/var/pretix/venv/lib/python3.6/site-packages/django/dispatch/dispatcher.py", line 175, in <listcomp>
    for receiver in self._live_receivers(sender)
  File "/var/pretix/venv/lib/python3.6/site-packages/pretix_googlepaypasses/signals.py", line 84, in logentry_post_save
    if WalletobjectOutput.checkIfEventTicketClassExists(event, authedSession):
  File "/var/pretix/venv/lib/python3.6/site-packages/pretix_googlepaypasses/googlepaypasses.py", line 189, in checkIfEventTicketClassExists
    result = authedSession.get(
AttributeError: 'bool' object has no attribute 'get'
ERROR 2018-10-31 17:57:43,924 django.request log Internal Server Error: /control/event/LordBonzi/rulzc/settings/tickets
Traceback (most recent call last):
  File "/var/pretix/venv/lib/python3.6/site-packages/django/core/handlers/exception.py", line 34, in inner
    response = get_response(request)
  File "/var/pretix/venv/lib/python3.6/site-packages/django/core/handlers/base.py", line 126, in _get_response
    response = self.process_exception_by_middleware(e, request)
  File "/var/pretix/venv/lib/python3.6/site-packages/django/core/handlers/base.py", line 124, in _get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "/var/pretix/venv/lib/python3.6/site-packages/pretix/control/permissions.py", line 27, in wrapper
    return function(request, *args, **kw)
  File "/var/pretix/venv/lib/python3.6/site-packages/django/views/generic/base.py", line 68, in view
    return self.dispatch(request, *args, **kwargs)
  File "/var/pretix/venv/lib/python3.6/site-packages/django/views/generic/base.py", line 88, in dispatch
    return handler(request, *args, **kwargs)
  File "/usr/lib/python3.6/contextlib.py", line 52, in inner
    return func(*args, **kwds)
  File "/var/pretix/venv/lib/python3.6/site-packages/pretix/control/views/event.py", line 735, in post
    for k in provider.form.changed_data
  File "/var/pretix/venv/lib/python3.6/site-packages/pretix/base/models/base.py", line 80, in log_action
    logentry.save()
  File "/var/pretix/venv/lib/python3.6/site-packages/django/db/models/base.py", line 718, in save
    force_update=force_update, update_fields=update_fields)
  File "/var/pretix/venv/lib/python3.6/site-packages/django/db/models/base.py", line 758, in save_base
    update_fields=update_fields, raw=raw, using=using,
  File "/var/pretix/venv/lib/python3.6/site-packages/django/dispatch/dispatcher.py", line 175, in send
    for receiver in self._live_receivers(sender)
  File "/var/pretix/venv/lib/python3.6/site-packages/django/dispatch/dispatcher.py", line 175, in <listcomp>
    for receiver in self._live_receivers(sender)
  File "/var/pretix/venv/lib/python3.6/site-packages/pretix_googlepaypasses/signals.py", line 84, in logentry_post_save
    if WalletobjectOutput.checkIfEventTicketClassExists(event, authedSession):
  File "/var/pretix/venv/lib/python3.6/site-packages/pretix_googlepaypasses/googlepaypasses.py", line 189, in checkIfEventTicketClassExists
    result = authedSession.get(
AttributeError: 'bool' object has no attribute 'get'
pc-coholic commented 6 years ago

Did you set up the Issuer ID and Service-Account JSON in the global system settings?

bonzi commented 6 years ago

That'd be probably wise of me to do, I've applied for a API Key and I am just waiting to be granted one. I'll report back my findings once it arrives.

Thanks

bonzi commented 6 years ago

Hi again, I've gotten access to the API and have generated my Issuer ID and Service-Account JSON file and put them in the global settings. Now I get these errors in the pretix.log file instead of a JSON formatted error message

ERROR 2018-11-01 20:46:53,300 django.request log Internal Server Error: /LordBonzi/rulzc/order/CJDCT/j0amg4ef0an75qwp/download/27/googlepaypasses/generate
Traceback (most recent call last):
  File "/var/pretix/venv/lib/python3.6/site-packages/django/core/handlers/exception.py", line 34, in inner
    response = get_response(request)
  File "/var/pretix/venv/lib/python3.6/site-packages/django/core/handlers/base.py", line 126, in _get_response
    response = self.process_exception_by_middleware(e, request)
  File "/var/pretix/venv/lib/python3.6/site-packages/django/core/handlers/base.py", line 124, in _get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "/var/pretix/venv/lib/python3.6/site-packages/pretix/presale/utils.py", line 114, in wrap
    response = func(request=request, *args, **kwargs)
  File "/var/pretix/venv/lib/python3.6/site-packages/pretix/presale/utils.py", line 114, in wrap
    response = func(request=request, *args, **kwargs)
  File "/var/pretix/venv/lib/python3.6/site-packages/django/views/generic/base.py", line 68, in view
    return self.dispatch(request, *args, **kwargs)
  File "/var/pretix/venv/lib/python3.6/site-packages/pretix/presale/views/robots.py", line 7, in dispatch
    resp = super().dispatch(request, *args, **kwargs)
  File "/var/pretix/venv/lib/python3.6/site-packages/django/views/generic/base.py", line 88, in dispatch
    return handler(request, *args, **kwargs)
  File "/var/pretix/venv/lib/python3.6/site-packages/pretix_googlepaypasses/views.py", line 35, in get
    JWT = WalletobjectOutput.getWalletObjectJWT(self.order, kwargs['position'])
  File "/var/pretix/venv/lib/python3.6/site-packages/pretix_googlepaypasses/googlepaypasses.py", line 119, in getWalletObjectJWT
    eventTicketClass = WalletobjectOutput.getOrgenerateEventTicketClass(order.event, authedSession)
  File "/var/pretix/venv/lib/python3.6/site-packages/pretix_googlepaypasses/googlepaypasses.py", line 181, in getOrgenerateEventTicketClass
    return WalletobjectOutput.generateEventTicketClass(event, authedSession)
  File "/var/pretix/venv/lib/python3.6/site-packages/pretix_googlepaypasses/googlepaypasses.py", line 261, in generateEventTicketClass
    event.name,
  File "/var/pretix/venv/lib/python3.6/site-packages/walletobjects/eventTicketClass.py", line 95, in heroImage
    self._eventTicketClass['heroImage'] = utils.image(uri, description, localizedDescriptions, self._defaultLang)
  File "/var/pretix/venv/lib/python3.6/site-packages/walletobjects/utils.py", line 74, in image
    'sourceUri': utils.localizedUri(uri, description, stringsDict)
  File "/var/pretix/venv/lib/python3.6/site-packages/walletobjects/utils.py", line 55, in localizedUri
    'localizedDescription': utils.localizedString(stringsDict, default),
  File "/var/pretix/venv/lib/python3.6/site-packages/walletobjects/utils.py", line 21, in localizedString
    defaultLang = next(iter(stringsDict))
StopIteration
ERROR 2018-11-01 20:46:53,300 django.request log Internal Server Error: /LordBonzi/rulzc/order/CJDCT/j0amg4ef0an75qwp/download/27/googlepaypasses/generate
Traceback (most recent call last):
  File "/var/pretix/venv/lib/python3.6/site-packages/django/core/handlers/exception.py", line 34, in inner
    response = get_response(request)
  File "/var/pretix/venv/lib/python3.6/site-packages/django/core/handlers/base.py", line 126, in _get_response
    response = self.process_exception_by_middleware(e, request)
  File "/var/pretix/venv/lib/python3.6/site-packages/django/core/handlers/base.py", line 124, in _get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "/var/pretix/venv/lib/python3.6/site-packages/pretix/presale/utils.py", line 114, in wrap
    response = func(request=request, *args, **kwargs)
  File "/var/pretix/venv/lib/python3.6/site-packages/pretix/presale/utils.py", line 114, in wrap
    response = func(request=request, *args, **kwargs)
  File "/var/pretix/venv/lib/python3.6/site-packages/django/views/generic/base.py", line 68, in view
    return self.dispatch(request, *args, **kwargs)
  File "/var/pretix/venv/lib/python3.6/site-packages/pretix/presale/views/robots.py", line 7, in dispatch
    resp = super().dispatch(request, *args, **kwargs)
  File "/var/pretix/venv/lib/python3.6/site-packages/django/views/generic/base.py", line 88, in dispatch
    return handler(request, *args, **kwargs)
  File "/var/pretix/venv/lib/python3.6/site-packages/pretix_googlepaypasses/views.py", line 35, in get
    JWT = WalletobjectOutput.getWalletObjectJWT(self.order, kwargs['position'])
  File "/var/pretix/venv/lib/python3.6/site-packages/pretix_googlepaypasses/googlepaypasses.py", line 119, in getWalletObjectJWT
    eventTicketClass = WalletobjectOutput.getOrgenerateEventTicketClass(order.event, authedSession)
  File "/var/pretix/venv/lib/python3.6/site-packages/pretix_googlepaypasses/googlepaypasses.py", line 181, in getOrgenerateEventTicketClass
    return WalletobjectOutput.generateEventTicketClass(event, authedSession)
  File "/var/pretix/venv/lib/python3.6/site-packages/pretix_googlepaypasses/googlepaypasses.py", line 261, in generateEventTicketClass
    event.name,
  File "/var/pretix/venv/lib/python3.6/site-packages/walletobjects/eventTicketClass.py", line 95, in heroImage
    self._eventTicketClass['heroImage'] = utils.image(uri, description, localizedDescriptions, self._defaultLang)
  File "/var/pretix/venv/lib/python3.6/site-packages/walletobjects/utils.py", line 74, in image
    'sourceUri': utils.localizedUri(uri, description, stringsDict)
  File "/var/pretix/venv/lib/python3.6/site-packages/walletobjects/utils.py", line 55, in localizedUri
    'localizedDescription': utils.localizedString(stringsDict, default),
  File "/var/pretix/venv/lib/python3.6/site-packages/walletobjects/utils.py", line 21, in localizedString
    defaultLang = next(iter(stringsDict))
StopIteration

Thanks again for all your help.

pc-coholic commented 6 years ago

I haven't looked at this in too much detail as I'm on my phone right now...

But from just glancing at the trace, I would assume the problem to be in the walletobjects routine that builds localized Strings.

So a few things you could verify:

bonzi commented 6 years ago

Hi again,

Only one language is enabled for said event. Strings should be present, but knowing me I'll have broken it some how. I'll have a check when I'm free.

Thanks