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
Whenever I try to subclass a component I cannot use the app in debug mode.
Unfortunately it becomes unusable without debug mode when developing.
This is the full traceback
Traceback (most recent call last):
File "C:\Users\gioxc\AppData\Local\Programs\Python\Python37\lib\pkgutil.py", line 493, in find_loader
spec = importlib.util.find_spec(fullname)
File "C:\Users\gioxc\AppData\Local\Programs\Python\Python37\lib\importlib\util.py", line 114, in find_spec
raise ValueError('{}.__spec__ is None'.format(name))
ValueError: __main__.__spec__ is None
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "apptest.py", line 108, in <module>
app.run_server(debug=True)
File "C:\Users\gioxc\AppData\Local\Programs\Python\Python37\lib\site-packages\dash\dash.py", line 1475, in run_server
dev_tools_prune_errors,
File "C:\Users\gioxc\AppData\Local\Programs\Python\Python37\lib\site-packages\dash\dash.py", line 1282, in enable_dev_tools
for x in list(ComponentRegistry.registry) + ["dash_renderer"]
File "C:\Users\gioxc\AppData\Local\Programs\Python\Python37\lib\site-packages\dash\dash.py", line 1277, in <listcomp>
os.path.dirname(package.path)
File "C:\Users\gioxc\AppData\Local\Programs\Python\Python37\lib\site-packages\dash\dash.py", line 1282, in <genexpr>
for x in list(ComponentRegistry.registry) + ["dash_renderer"]
File "C:\Users\gioxc\AppData\Local\Programs\Python\Python37\lib\pkgutil.py", line 499, in find_loader
raise ImportError(msg.format(fullname, type(ex), ex)) from ex
ImportError: Error while finding loader for '__main__' (<class 'ValueError'>: __main__.__spec__ is None)
The text was updated successfully, but these errors were encountered:
Oh interesting - I guess the subclass is defined in the main app file itself? Not a use case we've encountered before but I guess we can filter out __main__ from this list. I wonder if there are any other cases pkgutil.find_loader will fail?
Meantime perhaps you can just put the subclass in a separate file?
Whenever I try to subclass a component I cannot use the app in debug mode.
Unfortunately it becomes unusable without debug mode when developing.
This is the full traceback
The text was updated successfully, but these errors were encountered: