question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

python sdk can't find module

See original GitHub issue

Describe the bug I can’t execute locally a python lambda, can’t find the modules, but I check and there are in the SDK.

/home/federico/.local/bin/sam local invoke --template /tmp/handler_swc_2019.lambda_handler-template1.yaml --event /tmp/handler_swc_2019.lambda_handler-event1.json
2019-01-02 12:08:44 Found credentials in environment variables.
2019-01-02 12:08:44 Invoking lambda/handler_swc_2019.lambda_handler (python3.6)
2019-01-02 12:08:44 Decompressing /tmp/8516626665729258067.zip

Fetching lambci/lambda:python3.6 Docker container image......
2019-01-02 12:08:48 Mounting /tmp/tmpvptv92cm as /var/task:ro inside runtime container
START RequestId: 20f39a93-306b-4d2b-a5af-5edb667ac3a6 Version: $LATEST
Unable to import module 'lambda/handler_swc_2019': No module named 'pushover'
END RequestId: 20f39a93-306b-4d2b-a5af-5edb667ac3a6
REPORT RequestId: 20f39a93-306b-4d2b-a5af-5edb667ac3a6 Duration: 140 ms Billed Duration: 200 ms Memory Size: 128 MB Max Memory Used: 24 MB

{"errorMessage": "Unable to import module 'lambda/handler_swc_2019'"}

Screenshots image

image

Your Environment

  • OS: Ubuntu
  • JetBrains’ Product: Build #IU-183.4886.37, built on December 17, 2018
  • JetBrains’ Product Version: 2018.3.2
  • Toolkit Version: v1.0
  • SAM CLI Version: v0.10
  • JVM/Python Version: Python 3.6

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:10 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
abrooksvcommented, Mar 1, 2019

@EKami We are migrating over to sam build in #811

0reactions
asybacommented, Mar 27, 2019

cool, will try that.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Python can't find installed module - Stack Overflow
Please look if there is a folder named geocoder in c:\users\myname\appdata\roaming\python\python39\site-packages (or some similar named folder).
Read more >
Installing Python Modules (Legacy version) — Python 3.11.1 ...
Note. This guide only covers the basic tools for building and distributing extensions that are provided as part of this version of Python....
Read more >
Why Can't Python Find My Modules? - Real Python
A common error that new Pythonistas will come across is that the packages they think they've installed are not actually being recognized by ......
Read more >
Python SDK: Cannot import module 'AlteryxPythonSDK...
Solved: I am trying to build an app that will use a custom python tool that I'm trying to make with the sdk....
Read more >
Configure a Python SDK | IntelliJ IDEA Documentation
Specify the location of the new conda environment in the Location field, or click · Select the Python version from the list. ·...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found