[英]Lambda Selectolax Import partially initialized module 'selectolax'
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:我想在我的 AWS Lambda Function 中使用 Selectolax HTMLParser 模块。我从这样的层导入这样的模块:
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)我总是收到错误消息:“errorMessage”:“无法从部分初始化的模块‘selectolax’导入名称‘parser’(很可能是由于循环导入)
The Problem lays not in the Name of My Function/File, i called it "Test123".问题不在于我的函数/文件的名称,我称之为“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.
由于 Selectolax 是一个公共模块,我不敢在使用 pip 安装后更改某些内容。我至少重新安装了 3 次 package,然后将其作为图层再次上传。
Reinstalling the Package with an older version(0.3.11) did solve the problem.使用旧版本 (0.3.11) 重新安装 Package 确实解决了问题。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.