Hi, I have setup a project with sst and language p...
# help
s
Hi, I have setup a project with sst and language python. Running
npx sst start
I get the following error:
Copy code
Traceback (most recent call last):
  File "/media/dataHD/development/startup/my-app/my-app/node_modules/@serverless-stack/core/src/runtime/shells/bootstrap.py", line 75, in <module>
    module = import_module(args.handler_module)
  File "/usr/lib/python3.9/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
  File "<frozen importlib._bootstrap>", line 972, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
  File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
  File "<frozen importlib._bootstrap>", line 984, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'src.c520f1aa'
a4bf9a48-382c-4a7f-97f6-85c830a2a7a6 ERROR ModuleNotFoundError: No module named 'src.c520f1aa' 
 undefined
t
Hey can I see your function definition?
s
Copy code
def handler(event, context):
  return {
    "statusCode": 200,
    "body": "Hello, World! Your request was received at {}.".format(event['requestContext']['time'])
  }
t
Sorry I meant your sst.Function definition
in your stacks code
s
Copy code
import * as sst from "@serverless-stack/resources";

export default class MyStack extends sst.Stack {
  constructor(scope, id, props) {
    super(scope, id, props);

    // Create a HTTP API
    const api = new sst.Api(this, "Api", {
      defaultFunctionProps: {
        srcPath: "src",
      },
      routes: {
        "GET /": "lambda.handler",
      }
    });

    // Show the endpoint in the output
    this.addOutputs({
      "ApiEndpoint": api.url,
    });
  }
}
t
Got it I think I found the issue, let me try and fix and send you a test build
s
ok
t
are you using yarn or npm?
s
npm
t
Can you run
Copy code
npx sst update 0.54.2-next.0
and see if that works
s
now it works!
thanks
t
ok let me release this officially
ok available in
v0.54.2