[Python] Lambda Selectolax Import partially initialized module 'selectolax'

Discussão em 'Python' iniciado por Stack, Julho 3, 2025.

  1. Stack

    Stack Membro Participativo

    i tryed to fix this problem for hours now but i can't solve it. I did read through some similiar questions but they coudnt help me.

    I want to use the Selectolax HTMLParser Module inside my AWS Lambda Function. I Import the module like this from an Layer like this:

    from selectolax.parser import HTMLParser

    I always get the error: "errorMessage": "cannot import name 'parser' from partially initialized module 'selectolax' (most likely due to a circular import)

    The Problem lays not in the Name of My Function/File, i called it "Test123". As Selectolax is a public Module, i was afraid to change something after installing it with pip. I reinstalled the package at least 3 times and uploaded it again as a layer.

    Continue reading...

Compartilhe esta Página