Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

No module named pyasn1.codec.der

未关闭
#41 2 条评论 1 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

  • #50 来自 @gene1wood —— 已关闭,未合并

评估

难度
4/5
预计耗时
3-5 天
新手友好度
25/100
Issue 类型
缺陷
描述清晰度
需要澄清
活跃度
停滞
技术栈
aws, cryptography, python

调研方向

首先检查 lambda_packages/cryptography 和提取出的 cryptography-1.4.tar.gz 内容;然后使用所述的 CloudFormation package 重现 AWS Lambda 部署,并检查 CloudWatch import error。部署的 function 能够在没有 pyasn1.codec.der error 的情况下导入 cryptography,即表示完成。

由索引模型根据 Issue 内容生成。

描述

Hello.
So, I've been trying to include one of the libs from lambda-packages, and failed repeatedly :(

I'm hitting on the error in the title:

No module named pyasn1.codec.der

Specifically, I'm trying to get the cryptography module into my lambda deployment packages, but maybe I'm misunderstanding the quick guide:

But, if you want to use this project the other (wrong) way, just put the contents of the .tar.gz archive into your lambda .zip.

Yes, I'm sorry, but I can't jump on Zappa at this point (maybe after this proof of concept is done), but it seems like I shouldn't have to, right?

So.. working on a Mac, I:

  • downloaded lambda-packages-master.zip, extracted its contents
  • dug into \lambda_packages\cryptography,
  • grabbed and extracted (to libs-for-aws\cryptography ) the cryptography-1.4.tar.gz archive.

Then I built my Lambda Deployment Package, and added to it the libs-for-aws\cryptography directory.

Package via Cloud Formation, deploy to AWS, and, when my Lambda is triggered, I get a 500, and in CloudWatch logs I get this message (cauth is just the name of my Lambda package)

START RequestId: 938e62f0-18a2-11e7-a55f-d146b6ce0af9 Version: $LATEST
Unable to import module 'cauth': No module named pyasn1.codec.der
END RequestId: 938e62f0-18a2-11e7-a55f-d146b6ce0af9

Am I doing something wrong in the way I'm trying to include the cryptography package from lambda-packages?

主要语言
Shell
星标
728
派生
157
PR 合并指标
30 天内没有已合并 PR

环境准备

这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

Miserlou/lambda-packages 的其他 Issue

查看 Miserlou/lambda-packages 的全部 Issue

相似的 Issue

更多 Shell/Bash Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。