-
Notifications
You must be signed in to change notification settings - Fork 127
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make codebase compatible with Dash 2.0 release #354
Comments
I think the problem is with the dash package, yourenvironment/dash/_callback.py
I tried (python3.6) adding
and helps my problem (no user in kwargs). |
@IDepla neat fix, thanks. Will see if we can somehow override this function in Dash |
@GibbsConsulting @IDepla Hey guys, running into this issue currently. What is your advice on the best way to implement this fix? I am currently going to simply fork dash, add the fix, and use that for the project until there is an official patch for overriding the dash func in django-plotly-dash, and we can revert back to the official Dash package... I'm not sure how viable this is, or if I can simply override it myself within the django app without having to touch either dash or django-plotly-dash. How did you implement this fix? @IDepla I know it is a very ill advised practice to edit anything installed directly under ./myenv/site_packages/, so I am leaning towards forking, adding your fix, and installing with Any thoughts on this strategy? EDIT: forking and installing from my github repo does not work, as it does not install modules in a comptabile way, eg. dash_core_components ( |
Any update on this? |
@limsammy one alternative could be to monkey patch that function at runtime - in other words, import the module it is in and set the function equal to the new desired one. You will have to ensure that you do this patching prior to executing any callback. |
@limsammy it was meant to be temporary until dash fixes the problem. I was wondering (but I didn't try), a way to operationalize @GibbsConsulting's comment could be to hijack directly the module cache (https://docs.python.org/3/reference/import.html) since the load of the Django settings. Either way, the dash app is imported after the settings, so you override the cache reference before is called by any other module. If the fix has to live for longer than expected, a better way would be to just add the variables that you need (and are validated) instead of copying all the **kwargs. |
Another new feature that came in with Dash 2.0 is the "flexible callback". Take a look here: |
Current incompatibility with jupyter-dash & django-plotly-dash plotly/jupyter-dash#75 GibbsConsulting/django-plotly-dash#354
v2.0.0 is now out! |
As well as #351, there is also a need to make
django-plotly-dash
work with the recent v2.x release(s) of Dash.One issue has already been reported as #353
The text was updated successfully, but these errors were encountered: