FelixSchwarz / mjml-python

Python implementation for MJML - a framework that makes responsive-email easy
MIT License
73 stars 16 forks source link

TypeError in mj_section.py #47

Closed thomashandorf closed 8 months ago

thomashandorf commented 8 months ago

Hi,

i got the following error:

File "/Users/handorf/.pyenv/versions/3.10.2/envs/ga3-exporter/lib/python3.10/site-packages/mjml/elements/mj_section.py", line 342, in renderWithBackground vY = self._calc_origin_pos_value(is_y=False, bg_pos=bgPosY) TypeError: MjSection._calc_origin_pos_value() got an unexpected keyword argument 'is_y'

seems to be a simple typo.

FelixSchwarz commented 8 months ago

Thank you for the bug report. Do you think you can provide a minimal mjml file which triggers the error? I would love to extend the test suite.

thomashandorf commented 8 months ago

Hi Frank, sure, i extracted an example:

`





Enjoy our Black Friday Savings! 🎁 30% off Professional and Regular packages
🎁 15% off Add-ons

Only Monday 20th through Sunday 26th of November 2023.
Get Offer Now
Brand Impressum support@example.com

`

Thanks for the great work, by the way!

FelixSchwarz commented 8 months ago

minimal reproducer

<mjml>
  <mj-body>
    <mj-section background-url="http://site.example/test.png" background-size="contain">
      <mj-column>
        <mj-text>Foo Bar</mj-text>
      </mj-column>
    </mj-section>
  </mj-body>
</mjml>
FelixSchwarz commented 8 months ago

should be fixed in the latest main branch (827333421edcac08be680ea42f010f0232ea553d), I assume we'll do a new release once #45 is completed as well.