Issue in django sls management commands
See original GitHub issueHi People,
I’m using serverless-wsgi==1.7.6
alongside serverless==2.2.0
.
The problem is when I intend to run a management command as stated in the documents I must be executing this:
sls wsgi manage -c "update_containers"
But this raises an exception with this error message:
Error --------------------------------------------------
Error: Config file update_containers not found
at Utils.findServicePath (/home/ubuntu/.npm-packages/lib/node_modules/serverless/lib/classes/Utils.js:109:15)
at new Serverless (/home/ubuntu/.npm-packages/lib/node_modules/serverless/lib/Serverless.js:43:18)
at Object.<anonymous> (/home/ubuntu/.npm-packages/lib/node_modules/serverless/scripts/serverless.js:35:14)
at Module._compile (internal/modules/cjs/loader.js:1015:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1035:10)
at Module.load (internal/modules/cjs/loader.js:879:32)
at Function.Module._load (internal/modules/cjs/loader.js:724:14)
at Module.require (internal/modules/cjs/loader.js:903:19)
at require (internal/modules/cjs/helpers.js:74:18)
at Object.<anonymous> (/home/ubuntu/.npm-packages/lib/node_modules/serverless/bin/serverless.js:47:1)
at Module._compile (internal/modules/cjs/loader.js:1015:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1035:10)
at Module.load (internal/modules/cjs/loader.js:879:32)
at Function.Module._load (internal/modules/cjs/loader.js:724:14)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:60:12)
at internal/main/run_main_module.js:17:47
Get Support --------------------------------------------
Docs: docs.serverless.com
Bugs: github.com/serverless/serverless/issues
Issues: forum.serverless.com
Your Environment Information ---------------------------
Operating System: linux
Node Version: 12.19.1
Framework Version: 2.2.0
Plugin Version: 4.0.4
SDK Version: 2.3.2
Components Version: 3.1.4
This command is the same as stated in the repo README.md file, but changing -c
to --command
fixes the problem!
So am I missing something here or -c
is a broken argument?
And I would like to contribute to fix the problem, should I be updating the documents or fix handling -c
arg just like --command
?
Any guidance would be appreciated ❤️
Issue Analytics
- State:
- Created 3 years ago
- Comments:10 (2 by maintainers)
Top Results From Across the Web
Serverless WSGI not working in pipelines (works locally)
I can run the sls wsgi manage commands locally (with same AWS keys) without issue. The issue only seems to happen in the...
Read more >Starting Serverless with Django - Medium
Creating a new Serverless project. To begin a new Serverless project, the easiest way is to simply run the serverles create (or sls...
Read more >Serverless WSGI plugin
sls plugin install -n serverless-wsgi ... The wsgi manage command lets you execute Django management commands remotely: Copied. $ sls wsgi manage -c...
Read more >Deploying a Django project on AWS Lambda using Serverless ...
I use default django-admin startproject cli command in this example. pip install django django-admin startproject django_aws_lambda ...
Read more >Django management command using Zappa - O'Reilly
There are some limitations though. It is only for Django's manage command to use, hence it's bound to Django projects only. For passing...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Awesome! Yes I’m still interested, I will take a look at it this weekend and open a PR so we can discuss further.
Cheers
Sorry, I haven’t had any time to spare for this project in a while - I like your first proposal (
-t
/--task
) if that flag is available. Not sure if you’re still interested, but otherwise I’m leaving this comment for anyone else to pick up.