You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was wondering why my frontend page kept being empty (index.html loaded but without data). As I did a lot of infrastructure changes I ignored it first.
Yesterday, I started digging and found the reason to be unescaped characters in pethubconfig.json. To be precise:
I was wondering why my frontend page kept being empty (index.html loaded but without data). As I did a lot of infrastructure changes I ignored it first.
Yesterday, I started digging and found the reason to be unescaped characters in pethubconfig.json. To be precise:
"Custom_Modes": "['Threeseconds', 'Metalmode2', 'Extendedrange']"
The loading function for the config sits in
pethublocal/pethublocal/frontend.py
Line 194 in d3fc739
and this then obviously results in a
Uncaught SyntaxError missing ( after argument list
A fix is to remove the JSON.parse entirely as you read JSON into JS which does not require any additional parsing:
return web.Response(content_type='application/javascript', body='pethubconfig=' + json.dumps(request.app['pethubconfig']))
This populates the frontend again without any errors.
The text was updated successfully, but these errors were encountered: