INFO: Started server process [11876]
INFO: Waiting for application startup.
INFO: Application startup complete.
ERROR: [Errno 10048] error while attempting to bind on address ('0.0.0.0', 8000): only one
usage of each socket address (protocol/network address/port) is normally permitted
INFO: Waiting for application shutdown.
INFO: Application shutdown complete.
---------------------------------------------------------------------------
OSError Traceback (most recent call last)
File ~\anaconda3\Library\New folder\anaconda2\lib\site-packages\uvicorn\server.py:157, in
Server.startup(self, sockets)
156 try:
--> 157 server = await loop.create_server(
158 create_protocol,
159 host=config.host,
160 port=config.port,
161 ssl=config.ssl,
162 backlog=config.backlog,
163 )
164 except OSError as exc:
File ~\anaconda3\Library\New folder\anaconda2\lib\asyncio\base_events.py:1513, in
BaseEventLoop.create_server(self, protocol_factory, host, port, family, flags, sock, backlog,
ssl, reuse_address, reuse_port, ssl_handshake_timeout, start_serving)
1512 except OSError as err:
-> 1513 raise OSError(err.errno, 'error while attempting '
1514 'to bind on address %r: %s'
1515 % (sa, err.strerror.lower())) from None
1516 completed = True
OSError: [Errno 10048] error while attempting to bind on address ('0.0.0.0', 8000): only one
usage of each socket address (protocol/network address/port) is normally permitted
During handling of the above exception, another exception occurred:
SystemExit Traceback (most recent call last)
[... skipping hidden 1 frame]
Cell In[8], line 4
3 loop.run_until_complete(main())
----> 4 uvicorn.run(app, host="0.0.0.0", port=8000)
File ~\anaconda3\Library\New folder\anaconda2\lib\site-packages\uvicorn\main.py:575, in
run(app, host, port, uds, fd, loop, http, ws, ws_max_size, ws_max_queue,
ws_ping_interval, ws_ping_timeout, ws_per_message_deflate, lifespan, interface, reload,
reload_dirs, reload_includes, reload_excludes, reload_delay, workers, env_file,
log_config, log_level, access_log, proxy_headers, server_header, date_header,
forwarded_allow_ips, root_path, limit_concurrency, backlog, limit_max_requests,
timeout_keep_alive, timeout_graceful_shutdown, ssl_keyfile, ssl_certfile,
ssl_keyfile_password, ssl_version, ssl_cert_reqs, ssl_ca_certs, ssl_ciphers, headers,
use_colors, app_dir, factory, h11_max_incomplete_event_size)
574 else:
--> 575 server.run()
576 if config.uds and os.path.exists(config.uds):
File ~\anaconda3\Library\New folder\anaconda2\lib\site-packages\uvicorn\server.py:62, in
Server.run(self, sockets)
61 self.config.setup_event_loop()
---> 62 return asyncio.run(self.serve(sockets=sockets))
File ~\anaconda3\Library\New folder\anaconda2\lib\site-packages\nest_asyncio.py:35, in
_patch_asyncio.<locals>.run(main, debug)
34 try:
---> 35 return loop.run_until_complete(task)
36 finally:
File ~\anaconda3\Library\New folder\anaconda2\lib\site-packages\nest_asyncio.py:84, in
_patch_loop.<locals>.run_until_complete(self, future)
83 while not f.done():
---> 84 self._run_once()
85 if self._stopping:
File ~\anaconda3\Library\New folder\anaconda2\lib\site-packages\nest_asyncio.py:120, in
_patch_loop.<locals>._run_once(self)
119 if not handle._cancelled:
--> 120 handle._run()
121 handle = None
File ~\anaconda3\Library\New folder\anaconda2\lib\asyncio\events.py:80, in
Handle._run(self)
79 try:
---> 80 self._context.run(self._callback, *self._args)
81 except (SystemExit, KeyboardInterrupt):
File ~\anaconda3\Library\New folder\anaconda2\lib\asyncio\tasks.py:315, in
Task.__wakeup(self, future)
308 else:
309 # Don't pass the value of `future.result()` explicitly,
310 # as `Future.__iter__` and `Future.__await__` don't need it.
(...)
313 # instead of `__next__()`, which is slower for futures
314 # that return non-generator iterators from their `__iter__`.
--> 315 self.__step()
316 self = None
File ~\anaconda3\Library\New folder\anaconda2\lib\site-packages\nest_asyncio.py:196, in
_patch_task.<locals>.step(task, exc)
195 try:
--> 196 step_orig(task, exc)
197 finally:
File ~\anaconda3\Library\New folder\anaconda2\lib\asyncio\tasks.py:232, in
Task.__step(***failed resolving arguments***)
229 if exc is None:
230 # We use the `send` method directly, because coroutines
231 # don't have `__iter__` and `__next__` methods.
--> 232 result = coro.send(None)
233 else:
File ~\anaconda3\Library\New folder\anaconda2\lib\site-packages\uvicorn\server.py:79, in
Server.serve(self, sockets)
77 logger.info(message, process_id, extra={"color_message": color_message})
---> 79 await self.startup(sockets=sockets)
80 if self.should_exit:
File ~\anaconda3\Library\New folder\anaconda2\lib\site-packages\uvicorn\server.py:167, in
Server.startup(self, sockets)
166 await self.lifespan.shutdown()
--> 167 sys.exit(1)
169 assert server.sockets is not None
SystemExit: 1
During handling of the above exception, another exception occurred:
AssertionError Traceback (most recent call last)
[... skipping hidden 1 frame]
File ~\anaconda3\Library\New
folder\anaconda2\lib\site-packages\IPython\core\interactiveshell.py:2047, in
InteractiveShell.showtraceback(self, exc_tuple, filename, tb_offset, exception_only,
running_compiled_code)
2044 if exception_only:
2045 stb = ['An exception has occurred, use %tb to see '
2046 'the full traceback.\n']
-> 2047 stb.extend(self.InteractiveTB.get_exception_only(etype,
2048 value))
2049 else:
2050 try:
2051 # Exception classes can customise their traceback - we
2052 # use this in IPython.parallel for exceptions occurring
2053 # in the engines. This should return a list of strings.
File ~\anaconda3\Library\New
folder\anaconda2\lib\site-packages\IPython\core\ultratb.py:585, in
ListTB.get_exception_only(self, etype, value)
577 def get_exception_only(self, etype, value):
578 """Only print the exception type and message, without a traceback.
579
580 Parameters
(...)
583 value : exception value
584 """
--> 585 return ListTB.structured_traceback(self, etype, value)
File ~\anaconda3\Library\New
folder\anaconda2\lib\site-packages\IPython\core\ultratb.py:452, in
ListTB.structured_traceback(self, etype, evalue, etb, tb_offset, context)
449 chained_exc_ids.add(id(exception[1]))
450 chained_exceptions_tb_offset = 0
451 out_list = (
--> 452 self.structured_traceback(
453 etype, evalue, (etb, chained_exc_ids),
454 chained_exceptions_tb_offset, context)
455 + chained_exception_message
456 + out_list)
458 return out_list
File ~\anaconda3\Library\New
folder\anaconda2\lib\site-packages\IPython\core\ultratb.py:1118, in
AutoFormattedTB.structured_traceback(self, etype, value, tb, tb_offset,
number_of_lines_of_context)
1116 else:
1117 self.tb = tb
-> 1118 return FormattedTB.structured_traceback(
1119 self, etype, value, tb, tb_offset, number_of_lines_of_context)
File ~\anaconda3\Library\New
folder\anaconda2\lib\site-packages\IPython\core\ultratb.py:1012, in
FormattedTB.structured_traceback(self, etype, value, tb, tb_offset,
number_of_lines_of_context)
1009 mode = self.mode
1010 if mode in self.verbose_modes:
1011 # Verbose modes need a full traceback
-> 1012 return VerboseTB.structured_traceback(
1013 self, etype, value, tb, tb_offset, number_of_lines_of_context
1014 )
1015 elif mode == 'Minimal':
1016 return ListTB.get_exception_only(self, etype, value)
File ~\anaconda3\Library\New
folder\anaconda2\lib\site-packages\IPython\core\ultratb.py:865, in
VerboseTB.structured_traceback(self, etype, evalue, etb, tb_offset,
number_of_lines_of_context)
856 def structured_traceback(
857 self,
858 etype: type,
(...)
862 number_of_lines_of_context: int = 5,
863 ):
864 """Return a nice text document describing the traceback."""
--> 865 formatted_exception = self.format_exception_as_a_whole(etype, evalue, etb,
number_of_lines_of_context,
866 tb_offset)
868 colors = self.Colors # just a shorthand + quicker name lookup
869 colorsnormal = colors.Normal # used a lot
File ~\anaconda3\Library\New
folder\anaconda2\lib\site-packages\IPython\core\ultratb.py:799, in
VerboseTB.format_exception_as_a_whole(self, etype, evalue, etb,
number_of_lines_of_context, tb_offset)
796 assert isinstance(tb_offset, int)
797 head = self.prepare_header(etype, self.long_header)
798 records = (
--> 799 self.get_records(etb, number_of_lines_of_context, tb_offset) if etb else []
800 )
802 frames = []
803 skipped = 0
File ~\anaconda3\Library\New
folder\anaconda2\lib\site-packages\IPython\core\ultratb.py:854, in
VerboseTB.get_records(self, etb, number_of_lines_of_context, tb_offset)
848 formatter = None
849 options = stack_data.Options(
850 before=before,
851 after=after,
852 pygments_formatter=formatter,
853 )
--> 854 return list(stack_data.FrameInfo.stack_data(etb, options=options))[tb_offset:]
File ~\anaconda3\Library\New folder\anaconda2\lib\site-packages\stack_data\core.py:546,
in FrameInfo.stack_data(cls, frame_or_tb, options, collapse_repeated_frames)
530 @classmethod
531 def stack_data(
532 cls,
(...)
536 collapse_repeated_frames: bool = True
537 ) -> Iterator[Union['FrameInfo', RepeatedFrames]]:
538 """
539 An iterator of FrameInfo and RepeatedFrames objects representing
540 a full traceback or stack. Similar consecutive frames are collapsed into
RepeatedFrames
(...)
544 and optionally an Options object to configure.
545 """
--> 546 stack = list(iter_stack(frame_or_tb))
548 # Reverse the stack from a frame so that it's in the same order
549 # as the order from a traceback, which is the order of a printed
550 # traceback when read top to bottom (most recent call last)
551 if is_frame(frame_or_tb):
File ~\anaconda3\Library\New folder\anaconda2\lib\site-packages\stack_data\utils.py:98, in
iter_stack(frame_or_tb)
96 while frame_or_tb:
97 yield frame_or_tb
---> 98 if is_frame(frame_or_tb):
99 frame_or_tb = frame_or_tb.f_back
100 else:
File ~\anaconda3\Library\New folder\anaconda2\lib\site-packages\stack_data\utils.py:91, in
is_frame(frame_or_tb)
90 def is_frame(frame_or_tb: Union[FrameType, TracebackType]) -> bool:
---> 91 assert_(isinstance(frame_or_tb, (types.FrameType, types.TracebackType)))
92 return isinstance(frame_or_tb, (types.FrameType,))
File ~\anaconda3\Library\New folder\anaconda2\lib\site-packages\stack_data\utils.py:172,
in assert_(condition, error)
170 if isinstance(error, str):
171 error = AssertionError(error)
--> 172 raise error
AssertionError: