-1

I'm working on an app and when I run the API.py file in powershell, I get this output

Bottle v0.12.19 server starting up (using WSGIRefServer())...
Listening on http://0.0.0.0:8085/
Hit Ctrl-C to quit.

<frozen importlib._bootstrap>:914: ImportWarning: _ImportRedirect.find_spec() not found; falling back to find_module()

As you can see the server starts at 0.0.0.0:8085 and then I get an import warning.

When I put in the http://0.0.0.0:8085/ I get "The webpage at http://0.0.0.0:8085/ might be temporarily down or it may have moved permanently to a new web address." And none of front end calls (for example to log in to the app) get errors.

I have a feeling its due to the import warning but I'm not sure.

Here are my imports

import json

from bottle import app, get, hook, post, route, run, request, response
from beaker.middleware import SessionMiddleware
from unqlite import UnQLite
from buildDB import BuildDB
from encrypt_passwords import encrypt_passwords

When I Ctrl+C the python server I also get this after the import warning.

C:\Users\[USERNAME]\AppData\Local\Programs\Python\Python310\lib\site-packages\bottle.py:3139: ResourceWarning: unclosed <socket.socket fd=468, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=0, laddr=('0.0.0.0', 8085)>
  pass
ResourceWarning: Enable tracemalloc to get the object allocation traceback
apaderno
  • 28,547
  • 16
  • 75
  • 90
reid poynter
  • 41
  • 1
  • 6

1 Answers1

0

I had to change a base url variable i had in one of my python scripts to go from 0.0.0.0 to http://localhost:8085 server is now working!

reid poynter
  • 41
  • 1
  • 6