Skip to content

AttributeError: module 'folium' has no attribute 'plugins' #1939

@JustAnotherVeryNormalDeveloper

Description

Describe the bug
Importing only folium isn't enough to make folium.plugins classes work.

To Reproduce

import folium
import folium.plugins # if we comment this line, the code crash  at line 4: AttributeError: module 'folium' has no attribute 'plugins'

folium.plugins.treelayercontrol.TreeLayerControl

Expected behavior
this 2 lines should compile like this.

import folium
folium.plugins.treelayercontrol.TreeLayerControl

Environment (please complete the following information):
chrome
html
folium: 0.16.1.dev54+g570f293
branca: 0.7.1

Additional context
Maybe it needs another issue, when I do pip install folium it get me the 0.16.0 and I don't have the file:

Possible solutions
https://github.com/python-visualization/folium/blob/main/folium/__init__.py
add the line: import plugins ? (sounds too easy, it feels like a trap XD)

folium is maintained by volunteers. Can you help making a fix for this issue?

  • why not, as a folium enthusiast, I would be proud to :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions