Dear guys,
I cannot put this post into bug reports, therefore I list it here. In my case the anvil.media call print_media seems to not work constantly. At first the below showed code works fine until some timeout (after 15-30 minutes) an internal error arises (code below). Do anybody of you know what the reason could be or if this function is still in process?
CODE SNIPET:
try:
print('Before printing')
anvil.media.print_media(resp)
print('After printing')
except Exception as e:
print('Error printing bill media',e)
CONSOLE OUTPUT:
- Before printing
[An internal error has occurred] - see browser console for more details
TypeError: Cannot set properties of null (setting 'onload') at t.onclick (https://anvil.works/runtime-new/runtime/js/runner.bundle.js?sha=1d34bbf7955d709194fa6f33c295a7c7d7ca27deed452172d385f2a7192b0741:346:413) at Arguments.<anonymous> (https://anvil.works/runtime-new/runtime/js/runner.bundle.js?sha=1d34bbf7955d709194fa6f33c295a7c7d7ca27deed452172d385f2a7192b0741:346:506) at Sk.misceval.chain (https://anvil.works/runtime-new/runtime/js/lib/skulpt.min.js?sha=2b09aa0590c8a83c7a4a5fbee77f64faf07023095aff414e73e1de34f0526383:473:454) at $meth (https://anvil.works/runtime-new/runtime/js/runner.bundle.js?sha=1d34bbf7955d709194fa6f33c295a7c7d7ca27deed452172d385f2a7192b0741:346:71) at sk_method.$callOneArg (https://anvil.works/runtime-new/runtime/js/lib/skulpt.min.js?sha=2b09aa0590c8a83c7a4a5fbee77f64faf07023095aff414e73e1de34f0526383:315:449) at $date_link_click60790$ (eval at <anonymous> (https://anvil.works/runtime-new/runtime/js/lib/skulpt.min.js?sha=2b09aa0590c8a83c7a4a5fbee77f64faf07023095aff414e73e1de34f0526383:1089:392), <anonymous>:526:42) at susp.resume (eval at <anonymous> (https://anvil.works/runtime-new/runtime/js/lib/skulpt.min.js?sha=2b09aa0590c8a83c7a4a5fbee77f64faf07023095aff414e73e1de34f0526383:1089:392), <anonymous>:373:1826) at l (https://anvil.works/runtime-new/runtime/js/lib/skulpt.min.js?sha=2b09aa0590c8a83c7a4a5fbee77f64faf07023095aff414e73e1de34f0526383:471:443) at n (https://anvil.works/runtime-new/runtime/js/lib/skulpt.min.js?sha=2b09aa0590c8a83c7a4a5fbee77f64faf07023095aff414e73e1de34f0526383:472:1)
- After printing