Closed snwchow closed 2 years ago
https://github.com/ExpDev07/coronavirus-tracker-api#running--development
The dependencies are resolved for a Linux or Mac machine so they may not be correct for windows.
If you are just trying to start it you don't need the --dev
dependencies.
pipenv sync
pipenv run start
If you get more import/ dependency issues then you need to re-resolve the dependencies for windows.
pipenv install
Thank you for the reply; I tried "pipenv run start" after getting into the subshell virtual environment via "pipenv shell", but is now met with a "uvicorn error" running on http://127.0.0.1:8000 which suggests that it is somehow attempting to loopback to my local machine(?); with a suggested action of (Press CTRL+C to quit), which obviously aborts the program.
You probably have something else using that port. https://www.uvicorn.org/#command-line-options
The pipenv run start
command is defined in the Pipfile
.
https://github.com/ExpDev07/coronavirus-tracker-api/blob/master/Pipfile#L44
You can alter that or just run uvicorn
directly and change the port number.
How can I find out what is using that port (port 8000), and stopping it/free it up so that coronavirus tracker api can use it?
Is there any ways to find out which port is currently free on my machine so that I can use the "uvicorn" command to change the port; and what would be the full command for it? I assume it has something to do with "uvicorn --port #### APP", what should the APP in this case be? It states that "APP" must be in format "
When I ran the "pipenv run start" command, one of the line shows a "uvicorn.error:Started server process [14072]", and from the task manager it actually shows Python is associated with that PID (PID changes everytime I attempt to run "pipenv run start", but it is always Python that is using that PID) Running "netstat -ano -p tcp" shows that Python is using that port when it is trying to run the program, which agrees with what the task manager tells me. The process goes away(obviously) once the program is aborted using CTRL+C...which doesn't get me anywhere.
How can I find out what is using that port (port 8000), and stopping it/free it up so that coronavirus tracker api can use it? Is there any ways to find out which port is currently free on my machine so that I can use the "uvicorn" command to change the port; and what would be the full command for it? I assume it has something to do with "uvicorn --port #### APP", what should the APP in this case be? It states that "APP" must be in format ":"
Just change the port that's being used. No reason for all that port detective work.
Look at the line I linked
https://github.com/ExpDev07/coronavirus-tracker-api/blob/master/Pipfile#L44
Just add a port.
start = "uvicorn app.main:APP --port 8001"
And pipenv run start
again.
Same problem, changing the port doesn't solve the problem in this case.
It looks like your remaining timeout issue is related to the host api.geonames.org
.
It doesn't look like a Windows issue.
I'm closing the issue.
Hello, I am having trouble running the program with a Windows machine; As instructed, I installed Python 3.8 and pipenv, created the virtual environment and installed the dependencies via "pipenv sync --dev" from the commandline, as well as entering the virtual environment via "pipenv shell"
When I attempted the run the program via "main.py" I was met with an "ImportError" stating that the "attempted relative import with no known parent package", and this is related to line 16, in from .config import get_settings
Could you provide advice as to how I can set up/what I need in order to run the program?