Skip to content

SVG Path Name Collision Issue in MonsterUI #85

Closed
@harelw

Description

@harelw

There's a name collision between two imported Path symbols:

  1. Path from pathlib (imported in MonsterUI's core module)
  2. Path from fasthtml.svg (used for SVG path elements)

When using wildcard imports Python uses the latest import's definition of a name. In this case, the SVG Path constructor was being silently overridden by pathlib.Path, causing SVG elements to fail to render.

I think this was introduced in latest updated to pip release.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions