Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question: No module named 'aws_lambda_logging' #2

Closed
opiuman opened this issue Dec 11, 2019 · 4 comments
Closed

Question: No module named 'aws_lambda_logging' #2

opiuman opened this issue Dec 11, 2019 · 4 comments

Comments

@opiuman
Copy link

opiuman commented Dec 11, 2019

Tried the logging code from README and got the error:

{ "errorMessage": "Unable to import module 'service': No module named 'aws_lambda_logging'", "errorType": "Runtime.ImportModuleError" }

The lambda runtime is Python 3.7.

@heitorlessa
Copy link
Contributor

heitorlessa commented Dec 11, 2019 via email

@nmoutschen
Copy link
Contributor

I just had the same issue on my side, with the following error message in my Lambda logs:

[ERROR] Runtime.ImportModuleError: Unable to import module 'main': No module named 'aws_lambda_logging'

This was solved by explicitely adding aws-lambda-logging in my requirements.txt.

@heitorlessa
Copy link
Contributor

heitorlessa commented Jan 8, 2020 via email

@heitorlessa
Copy link
Contributor

Fix has been published -- 0.3.1 is now fully working. Thanks for reporting @opiuman !

heitorlessa referenced this issue in heitorlessa/aws-lambda-powertools-python Mar 1, 2021
heitorlessa added a commit that referenced this issue Mar 3, 2021
* feat: initial working skeleton

Signed-off-by: heitorlessa <[email protected]>

* feat: use global lazy import for intellisense

* fix: default lazy provider

* chore: trigger CI #1

* chore: trigger CI #2

* chore: uncaught linting

* feat: add minimum generic interface for Tracing Provider and Segment

* fix: type hints

* refactor: use JSON Schema as dict to reduce I/O latency

* docs: changelog

* test: add perf tests for import

* test: adjust perf bar to flaky/CI machines

* fix(pytest): enforce coverage upon request only

Signed-off-by: heitorlessa <[email protected]>

* chore: address PR's review

* chore: correctly redistribute apache 2.0 unmodified code

* chore: test labeler

* refactor: lazy load fastjsonschema to prevent unnecessary http.client sessions
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants