emilhe / dash-leaflet

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

No context provided: useLeafletContext() can only be used in a descendant of <MapContainer>

PeterQFR opened this issue · comments

Have issues with map edit tool bar, upgraded my pip package for dash-leaflet and get this issue in the webbrowser:

No context provided: useLeafletContext() can only be used in a descendant of <MapContainer>

Dash leaflet version is 0.1.28 from dash_leaflet.__version__

ns Dash apps. Click to see the full stack trace or open your browser's console.)

9843/_/e<@http://10.42.0.59:8050/_dash-component-suites/dash_leaflet/async-editControl.js:1:1412

_@http://10.42.0.59:8050/_dash-component-suites/dash_leaflet/async-editControl.js:1:1526

renderWithHooks@http://10.42.0.59:8050/_dash-component-suites/dash/deps/react-dom@16.v2_11_1m1691499905.14.0.js:14938:29

mountIndeterminateComponent@http://10.42.0.59:8050/_dash-component-suites/dash/deps/react-dom@16.v2_11_1m1691499905.14.0.js:17617:15

beginWork@http://10.42.0.59:8050/_dash-component-suites/dash/deps/react-dom@16.v2_11_1m1691499905.14.0.js:18731:18

callCallback@http://10.42.0.59:8050/_dash-component-suites/dash/deps/react-dom@16.v2_11_1m1691499905.14.0.js:182:16

invokeGuardedCallbackDev@http://10.42.0.59:8050/_dash-component-suites/dash/deps/react-dom@16.v2_11_1m1691499905.14.0.js:231:18

invokeGuardedCallback@http://10.42.0.59:8050/_dash-component-suites/dash/deps/react-dom@16.v2_11_1m1691499905.14.0.js:286:33

beginWork$1@http://10.42.0.59:8050/_dash-component-suites/dash/deps/react-dom@16.v2_11_1m1691499905.14.0.js:23338:30

performUnitOfWork@http://10.42.0.59:8050/_dash-component-suites/dash/deps/react-dom@16.v2_11_1m1691499905.14.0.js:22292:14

workLoopSync@http://10.42.0.59:8050/_dash-component-suites/dash/deps/react-dom@16.v2_11_1m1691499905.14.0.js:22265:24

performSyncWorkOnRoot@http://10.42.0.59:8050/_dash-component-suites/dash/deps/react-dom@16.v2_11_1m1691499905.14.0.js:21891:11

flushSyncCallbackQueueImpl/<@http://10.42.0.59:8050/_dash-component-suites/dash/deps/react-dom@16.v2_11_1m1691499905.14.0.js:11224:26

unstable_runWithPriority@http://10.42.0.59:8050/_dash-component-suites/dash/deps/react@16.v2_11_1m1691499905.14.0.js:2685:14

runWithPriority$1@http://10.42.0.59:8050/_dash-component-suites/dash/deps/react-dom@16.v2_11_1m1691499905.14.0.js:11174:12

flushSyncCallbackQueueImpl@http://10.42.0.59:8050/_dash-component-suites/dash/deps/react-dom@16.v2_11_1m1691499905.14.0.js:11219:26

flushSyncCallbackQueue@http://10.42.0.59:8050/_dash-component-suites/dash/deps/react-dom@16.v2_11_1m1691499905.14.0.js:11207:5

flushPassiveEffectsImpl@http://10.42.0.59:8050/_dash-component-suites/dash/deps/react-dom@16.v2_11_1m1691499905.14.0.js:23018:5

unstable_runWithPriority@http://10.42.0.59:8050/_dash-component-suites/dash/deps/react@16.v2_11_1m1691499905.14.0.js:2685:14

runWithPriority$1@http://10.42.0.59:8050/_dash-component-suites/dash/deps/react-dom@16.v2_11_1m1691499905.14.0.js:11174:12

flushPassiveEffects@http://10.42.0.59:8050/_dash-component-suites/dash/deps/react-dom@16.v2_11_1m1691499905.14.0.js:22955:14

commitBeforeMutationEffects/<@http://10.42.0.59:8050/_dash-component-suites/dash/deps/react-dom@16.v2_11_1m1691499905.14.0.js:22834:13

workLoop@http://10.42.0.59:8050/_dash-component-suites/dash/deps/react@16.v2_11_1m1691499905.14.0.js:2629:44

flushWork@http://10.42.0.59:8050/_dash-component-suites/dash/deps/react@16.v2_11_1m1691499905.14.0.js:2584:18

performWorkUntilDeadline@http://10.42.0.59:8050/_dash-component-suites/dash/deps/react@16.v2_11_1m1691499905.14.0.js:2196:50

It is a new clean install in a docker container.

This is a know issue with the latest release. If you revert til dash-leaflet==0.1.23, the error should go away. I am working on a new major release (essentially a complete library rewrite) that will fix this issue, but there is still some way before I can release it.

That worked thankyou.