You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello
I've tried running project locally on Windows server (using cookiecutter), but backend is not starting.
docker logs shows:
Checking for script in /app/prestart.sh
Running script /app/prestart.sh
: not foundad.sh: 2: /app/prestart.sh:
Sorry, was using docker logs
"docker-compose logs backend" shows all the texts :)
Attaching to test_project_backend_1
backend_1 | Checking for script in /app/prestart.sh
backend_1 | Running script /app/prestart.sh
: not found | /start-reload.sh: 2: /app/prestart.sh:
there was an issue with backend/app/prestart.sh
when executing directly in container it returned error "/usr/bin/env: ‘bash\r’: No such file or directory"
changing line endings in vscode from "CRLF" to "LF" solved the issue. Project files might need update
Reacted by Xucong Zhan, Lee Joshi-Jones, Alejandro Mengana, Urbano Gutiérrez, ckoller, vicenterocha, Ricardo Belchior, Salim, Torben Wetter, Dositej and 5 more
Reacted by Urbano Gutiérrez, vicenterocha, Ricardo Belchior, Anne Namuli and Tom Aarsen
Reacted by Urbano Gutiérrez, vicenterocha, Ricardo Belchior, Anne Namuli and po2son
Reacted by Urbano Gutiérrez, vicenterocha, Ricardo Belchior, Anne Namuli, Tom Aarsen and DawidWirtek
This is in the output of command docker-compose logs:
backend_1 | There is no script /app/prestart.sh
backend_1 | INFO: Uvicorn running on http://0.0.0.0:80 (Press CTRL+C to quit)
backend_1 | INFO: Started reloader process [1] using statreload
backend_1 | ERROR: Error loading ASGI app. Import string ":app" must be in format "<module>:<attribute>".
This issue still persists on running on Windows.
I tried changing the line endings using both VSCode and then manually by using the command: find . -type f -exec dos2unix {} \;, but the issue still exists.
@pranjalsrv did you manage to solve the problem? Right now it sends me that error.
Checking for script in /app/prestart.sh
There is no script /app/prestart.sh
INFO: Uvicorn running on http://0.0.0.0:80 (Press CTRL+C to quit)
INFO: Started reloader process [1] using statreload
ERROR: Error loading ASGI app. Import string ":app" must be in format "<module>:<attribute>".
there was an issue with backend/app/prestart.sh
when executing directly in container it returned error "/usr/bin/env: ‘bash\r’: No such file or directory"
changing line endings in vscode from "CRLF" to "LF" solved the issue. Project files might need update
Activity
olegasdo commentedon Jun 16, 2019
Sorry, was using docker logs
"docker-compose logs backend" shows all the texts :)
Attaching to test_project_backend_1
backend_1 | Checking for script in /app/prestart.sh
backend_1 | Running script /app/prestart.sh
: not found | /start-reload.sh: 2: /app/prestart.sh:
olegasdo commentedon Jun 17, 2019
there was an issue with backend/app/prestart.sh
when executing directly in container it returned error "/usr/bin/env: ‘bash\r’: No such file or directory"
changing line endings in vscode from "CRLF" to "LF" solved the issue. Project files might need update
mastacheata commentedon Aug 13, 2019
I think that's an issue on cookiecutter and not on the files in this repository.
tiangolo commentedon Apr 18, 2020
Indeed, it's probably an issue with Cookiecutter on Windows: cookiecutter/cookiecutter#1159
But still, this should be fixed now with #149 🎉
It fixes the line endings of shell scripts right after generation.
github-actions commentedon Apr 29, 2020
Assuming the original issue was solved, it will be automatically closed now. But feel free to add more comments or create new issues.
rohitkumar93 commentedon Jul 6, 2020
I changed my prestart.sh to "LF" using VScode too, and checked it as well.
But I am getting the same error:
`Checking for script in /app/prestart.sh
Running script /app/prestart.sh
/start-reload.sh: 22: .: Can't open /app/prestart.sh`
pranjalsrv commentedon Aug 13, 2020
This is in the output of command
docker-compose logs:This issue still persists on running on Windows.
I tried changing the line endings using both VSCode and then manually by using the command:
find . -type f -exec dos2unix {} \;, but the issue still exists.danielbf92 commentedon Sep 21, 2020
@pranjalsrv did you manage to solve the problem? Right now it sends me that error.
OddBlueDog commentedon Sep 24, 2020
Have the same issue on macOS I have put the line endings as LF. Any ideas?
alemengana commentedon Oct 17, 2020
Thanks my friend !!!!!!
badrelmazaz commentedon Feb 9, 2022
I changed the end of line sequence from CRLF to LF end it worked. I used visual studio code to change this
🐛 Fix "A component suspended while responding to synchronous input" (#41