Python Flask Socket Error (new to Linux environment) -


this quick fix have run standstill , hope can help. please bear me, i'm not fluent in command line environment.

i'm beginning using python framework named flask. has been installed , got , running hello world. console sending me logs while calling program in browser.

to quit out of console logs, pressed ctrl-z (^z) ~~probably error starts?~~ , prompted with:

[1]+  stopped                 python hello.py 

now when either a) attempt run program in browser or b) run script in command line python hello.py im thrown error:

socket.error: [errno 48] address in use 

..and of course many other lines printed console.

a answer should include did wrong , can fix it, , accepted answer include why ;)

you guessed right, ctrl-z got in trouble. problem ctrl-z in effect leaves application paused, rather terminated. terminate program, want ctrl-c.

your program using socket configured use. attempting restart program results in new python instance trying use socket have configured program use - being held stopped program.

you have options forward here:

  • in shell stopped python instance, type %1 or fg 1 go running python instance stopped, , having what's displaying terminal.
    • after doing above, type ctrl-c, , end python instance have running, making socket available new python instance.
  • in same shell, type bg 1, cause python instance run in background, not displaying terminal. app should become responsive. @ point, type fg 1 command line display terminal again.

there other options available, including using ps find process id of python instance, , using kill send signals process, if can't find command line it's running from.

the manual pages shell should give more on job control. can use man command read manual. type man bash read bash manual. if running on other shell, can call man shell's name.


Comments

Popular posts from this blog

linux - xterm copying to CLIPBOARD using copy-selection causes automatic updating of CLIPBOARD upon mouse selection -

c++ - qgraphicsview horizontal scrolling always has a vertical delta -