wichert / lingua

Translation toolkit for Python
Other
45 stars 32 forks source link

Chameleon extraction fails for Chameleon 4.4.0 #111

Open Estartu opened 7 months ago

Estartu commented 7 months ago

The constuctor of ElementProgram has changed with 4.4 and lingua reports

  File "venv/bin/pot-create", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "venv/lib/python3.11/site-packages/click/core.py", line 1157, in __call__
    return self.main(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "venv/lib/python3.11/site-packages/click/core.py", line 1078, in main
    rv = self.invoke(ctx)
         ^^^^^^^^^^^^^^^^
  File "venv/lib/python3.11/site-packages/click/core.py", line 1434, in invoke
    return ctx.invoke(self.callback, **ctx.params)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "venv/lib/python3.11/site-packages/click/core.py", line 783, in invoke
    return __callback(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "venv/lib/python3.11/site-packages/lingua/extract.py", line 426, in main
    for message in extractor(real_filename, extractor_options):
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/venv/lib/python3.11/site-packages/lingua/extractors/xml.py", line 143, in __call__
    ElementProgram.__init__(self, source, filename=filename)
TypeError: ElementProgram.__init__() got an unexpected keyword argument 'filename'