Traceback (most recent call last):
File "/usr/local/lib/python3.8/site-packages/flask/app.py", line 2447, in wsgi_app
response = self.full_dispatch_request()
File "/usr/local/lib/python3.8/site-packages/flask/app.py", line 1952, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/usr/local/lib/python3.8/site-packages/flask_cors/extension.py", line 161, in wrapped_function
return cors_after_request(app.make_response(f(*args, **kwargs)))
File "/usr/local/lib/python3.8/site-packages/flask/app.py", line 1821, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "/usr/local/lib/python3.8/site-packages/flask/_compat.py", line 39, in reraise
raise value
File "/usr/local/lib/python3.8/site-packages/flask/app.py", line 1950, in full_dispatch_request
rv = self.dispatch_request()
File "/usr/local/lib/python3.8/site-packages/flask/app.py", line 1936, in dispatch_request
return self.view_functions[rule.endpoint](**req.view_args)
File "/usr/local/lib/python3.8/site-packages/connexion/decorators/decorator.py", line 48, in wrapper
response = function(request)
File "/usr/local/lib/python3.8/site-packages/connexion/decorators/security.py", line 327, in wrapper
return function(request)
File "/usr/local/lib/python3.8/site-packages/connexion/decorators/uri_parsing.py", line 144, in wrapper
response = function(request)
File "/usr/local/lib/python3.8/site-packages/connexion/decorators/validation.py", line 184, in wrapper
response = function(request)
File "/usr/local/lib/python3.8/site-packages/connexion/decorators/parameter.py", line 121, in wrapper
return function(**kwargs)
File "/workspaceFolder/backend/api/v1/pdf/__init__.py", line 99, in string_to_pdf
content = Paragraph(data['content'], style)
File "/usr/local/lib/python3.8/site-packages/reportlab/platypus/paragraph.py", line 1765, in __init__
self._setup(text, style, bulletText or getattr(style,'bulletText',None), frags, cleanBlockQuotedText)
File "/usr/local/lib/python3.8/site-packages/reportlab/platypus/paragraph.py", line 1786, in _setup
style, frags, bulletTextFrags = _parser.parse(text,style)
File "/usr/local/lib/python3.8/site-packages/reportlab/platypus/paraparser.py", line 3224, in parse
annotateException('\nparagraph text %s caused exception' % ascii(text))
File "/usr/local/lib/python3.8/site-packages/reportlab/lib/utils.py", line 1397, in annotateException
rl_reraise(t,v,b)
File "/usr/local/lib/python3.8/site-packages/reportlab/lib/utils.py", line 150, in rl_reraise
raise v
File "/usr/local/lib/python3.8/site-packages/reportlab/platypus/paraparser.py", line 3222, in parse
self.feed(text)
File "/usr/local/lib/python3.8/html/parser.py", line 111, in feed
self.goahead(0)
File "/usr/local/lib/python3.8/html/parser.py", line 173, in goahead
k = self.parse_endtag(i)
File "/usr/local/lib/python3.8/html/parser.py", line 421, in parse_endtag
self.handle_endtag(elem)
File "/usr/local/lib/python3.8/site-packages/reportlab/platypus/paraparser.py", line 3258, in handle_endtag
end()
File "/usr/local/lib/python3.8/site-packages/reportlab/platypus/paraparser.py", line 2866, in end_br
if not (frag._selfClosingTag=='br' and frag.lineBreak):
AttributeError: 'ParaFrag' object has no attribute '_selfClosingTag'
paragraph text '<para>Hi, </br> Thanks! </br> Greetings</para>' caused exception
This happens on a selfclosing
br
tag.</br>
.Styling
edit: data['content'] ->
Hi, </br> Thanks! </br> Greetings
Is there any solution available to solve this issue? Thanks in advance!