Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: patchedDrawPath() takes 2 positional arguments but 4 were given #47

Open
timthelion opened this issue Feb 15, 2021 · 2 comments

Comments

@timthelion
Copy link
Contributor

TypeError: patchedDrawPath() takes 2 positional arguments but 4 were given
  File "django/core/handlers/exception.py", line 34, in inner
    response = get_response(request)
  File "django/core/handlers/base.py", line 115, in _get_response
    response = self.process_exception_by_middleware(e, request)
  File "django/core/handlers/base.py", line 113, in _get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "newrelic/hooks/framework_django.py", line 563, in wrapper
    return wrapped(*args, **kwargs)
  File "django/views/generic/base.py", line 71, in view
    return self.dispatch(request, *args, **kwargs)
  File "dpnk/company_admin_views.py", line 345, in dispatch
    ret_val = super().dispatch(request, *args, **kwargs)
  File "dpnk/views_permission_mixins.py", line 51, in dispatch
    return super().dispatch(request, *args, **kwargs)
  File "dpnk/views_permission_mixins.py", line 182, in dispatch
    return super().dispatch(request, *args, **kwargs)
  File "braces/views/_access.py", line 102, in dispatch
    request, *args, **kwargs)
  File "newrelic/hooks/framework_django.py", line 953, in wrapper
    return wrapped(*args, **kwargs)
  File "django/views/generic/base.py", line 97, in dispatch
    return handler(request, *args, **kwargs)
  File "django/views/generic/edit.py", line 172, in post
    return super().post(request, *args, **kwargs)
  File "django/views/generic/edit.py", line 142, in post
    return self.form_valid(form)
  File "dpnk/company_admin_views.py", line 332, in form_valid
    self.object.save()
  File "python3.6/contextlib.py", line 52, in inner
    return func(*args, **kwds)
  File "dpnk/models/invoice.py", line 259, in save
    super().save(*args, **kwargs)
  File "model_utils/models.py", line 38, in save
    super().save(*args, **kwargs)
  File "django/db/models/base.py", line 744, in save
    force_update=force_update, update_fields=update_fields)
  File "django/db/models/base.py", line 793, in save_base
    update_fields=update_fields, raw=raw, using=using,
  File "django/dispatch/dispatcher.py", line 175, in send
    for receiver in self._live_receivers(sender)
  File "django/dispatch/dispatcher.py", line 175, in <listcomp>
    for receiver in self._live_receivers(sender)
  File "dpnk/models/invoice.py", line 344, in create_and_send_invoice_files
    invoice_gen.make_invoice_pdf(temp_pdf, invoice_data)
  File "dpnk/invoice_gen.py", line 96, in make_invoice_pdf
    pdf_file.gen(outfile_pdf, generate_qr_code=True)
  File "InvoiceGenerator/pdf.py", line 144, in gen
    self._drawMain()
  File "InvoiceGenerator/pdf.py", line 199, in _drawMain
    self.pdf.drawPath(path, True, True)
@timthelion
Copy link
Contributor Author

@timthelion
Copy link
Contributor Author

Though it seems that the original lib also takes just two arguments https://github.com/ejucovy/reportlab/blob/e63ba76436f25c8030ac61b9c3872aabf2e47d4e/src/reportlab/graphics/renderPDF.py#L172

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant