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

pydyf 0.11.0 breaks weasyprint #2202

Closed
andyhird opened this issue Jul 13, 2024 · 1 comment
Closed

pydyf 0.11.0 breaks weasyprint #2202

andyhird opened this issue Jul 13, 2024 · 1 comment

Comments

@andyhird
Copy link

Hi there.

It looks the new release of pydyf 0.11.0 has broken weasyprint.

We're seeing:


document = <weasyprint.document.Document object at 0x7f5ea25c6420>
target = <tempfile._TemporaryFileWrapper object at 0x7f5ea2617920>, zoom = 1
attachments = None, optimize_size = ('fonts',), identifier = None
variant = None, version = None, custom_metadata = False

    def generate_pdf(document, target, zoom, attachments, optimize_size,
                     identifier, variant, version, custom_metadata):
        # 0.75 = 72 PDF point per inch / 96 CSS pixel per inch
        scale = zoom * 0.75
    
        PROGRESS_LOGGER.info('Step 6 - Creating PDF')
    
        # Set properties according to PDF variants
        mark = False
        if variant:
            variant_function, properties = VARIANTS[variant]
            if 'version' in properties:
                version = properties['version']
            if 'mark' in properties:
                mark = properties['mark']
    
>       pdf = pydyf.PDF((version or '1.7'), identifier)
E       TypeError: PDF.__init__() takes 1 positional argument but 3 were given

In our various unit tests. pydyf 0.11.0 mentions a change to remove depreciated use of some positional arguments.

@grewn0uille
Copy link
Member

Hi,

This issue is a duplicate of #2200.

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

2 participants