Spaces:
Runtime error
Runtime error
Add debugging.
Browse files
app.py
CHANGED
|
@@ -253,7 +253,9 @@ def html_to_png(card_name, html):
|
|
| 253 |
css = ['./css/mana.css', './css/keyrune.css',
|
| 254 |
'./css/mtg_custom.css']
|
| 255 |
imgkit.from_string(html, path, {"xvfb": ""}, css=css)
|
| 256 |
-
except:
|
|
|
|
|
|
|
| 257 |
try:
|
| 258 |
# For Windows local, requires 'html2image' package from pip.
|
| 259 |
from html2image import Html2Image
|
|
|
|
| 253 |
css = ['./css/mana.css', './css/keyrune.css',
|
| 254 |
'./css/mtg_custom.css']
|
| 255 |
imgkit.from_string(html, path, {"xvfb": ""}, css=css)
|
| 256 |
+
except Exception as e:
|
| 257 |
+
print("ImgKit Error:")
|
| 258 |
+
print(e)
|
| 259 |
try:
|
| 260 |
# For Windows local, requires 'html2image' package from pip.
|
| 261 |
from html2image import Html2Image
|