ERROR: Exception in ASGI application Traceback (most recent call last): File…
- User
ERROR: Exception in ASGI application Traceback (most recent call last): File "C:\Users\AME\AppData\Local\Programs\Python\Python311\Lib\site-packages\anyio\streams\memory.py", line 98, in receive return self.receive_nowait() ^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\AME\AppData\Local\Programs\Python\Python311\Lib\site-packages\anyio\streams\memory.py", line 93, in receive_nowait
raise WouldBlock anyio.WouldBlockDuring handling of the above exception, another exception occurred:
Traceback (most recent call last): File "C:\Users\AME\AppData\Local\Programs\Python\Python311\Lib\site-packages\starlette\middleware\base.py", line 78, in call_next
message = await recv_stream.receive() ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\AME\AppData\Local\Programs\Python\Python311\Lib\site-packages\anyio\streams\memory.py", line 118, in receive raise EndOfStream anyio.EndOfStreamDuring handling of the above exception, another exception occurred:
Traceback (most recent call last): File "C:\Users\AME\AppData\Local\Programs\Python\Python311\Lib\site-packages\uvicorn\protocols\http\h11_impl.py", line 408, in run_asgi
result = await app( # type: ignore[func-returns-value] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\AME\AppData\Local\Programs\Python\Python311\Lib\site-packages\uvicorn\middleware\proxy_headers.py", line 84, in call
return await self.app(scope, receive, send) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\AME\AppData\Local\Programs\Python\Python311\Lib\site-packages\fastapi\applications.py", line 292, in call await super().call(scope, receive, send) File "C:\Users\AME\AppData\Local\Programs\Python\Python311\Lib\site-packages\starlette\applications.py", line 122, in call await self.middleware_stack(scope, receive, send) File "C:\Users\AME\AppData\Local\Programs\Python\Python311\Lib\site-packages\starlette\middleware\errors.py", line 184, in call
raise exc File "C:\Users\AME\AppData\Local\Programs\Python\Python311\Lib\site-packages\starlette\middleware\errors.py", line 162, in call
await self.app(scope, receive, send) File "C:\Users\AME\AppData\Local\Programs\Python\Python311\Lib\site-packages\starlette\middleware\base.py", line 108, in call
response = await self.dispatch_func(request, call_next) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "c:\Users\AME\Documents\PriceChecker-master\discogs-master\dist\vinyl-price-suggester-main\VinylPrices\tuner\Jobb_server_server\server.py", line 102, in add_process_time_header response = await call_next(request) ^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\AME\AppData\Local\Programs\Python\Python311\Lib\site-packages\starlette\middleware\base.py", line 84, in call_next
raise app_exc File "C:\Users\AME\AppData\Local\Programs\Python\Python311\Lib\site-packages\starlette\middleware\base.py", line 70, in coro await self.app(scope, receive_or_disconnect, send_no_error) File "C:\Users\AME\AppData\Local\Programs\Python\Python311\Lib\site-packages\starlette\middleware\cors.py", line 91, in await self.simple_response(scope, receive, send, request_headers=headers) File "C:\Users\AME\AppData\Local\Programs\Python\Python311\Lib\site-packages\starlette\middleware\cors.py", line 146, in simple_response await self.app(scope, receive, send) File "C:\Users\AME\AppData\Local\Programs\Python\Python311\Lib\site-packages\starlette\middleware\exceptions.py", line 79, in raise exc File "C:\Users\AME\AppData\Local\Programs\Python\Python311\Lib\site-packages\starlette\middleware\exceptions.py", line 68, in await self.app(scope, receive, sender) File "C:\Users\AME\AppData\Local\Programs\Python\Python311\Lib\site-packages\fastapi\middleware\asyncexitstack.py", line 20, in raise e File "C:\Users\AME\AppData\Local\Programs\Python\Python311\Lib\site-packages\fastapi\middleware\asyncexitstack.py", line 17, in await self.app(scope, receive, send) File "C:\Users\AME\AppData\Local\Programs\Python\Python311\Lib\site-packages\starlette\routing.py", line 718, in await route.handle(scope, receive, send) File "C:\Users\AME\AppData\Local\Programs\Python\Python311\Lib\site-packages\starlette\routing.py", line 276, in handle await self.app(scope, receive, send) File "C:\Users\AME\AppData\Local\Programs\Python\Python311\Lib\site-packages\starlette\routing.py", line 66, in app response = await func(request) ^^^^^^^^^^^^^^^^^^^ File "C:\Users\AME\AppData\Local\Programs\Python\Python311\Lib\site-packages\fastapi\routing.py", line 273, in app raw_response = await run_endpoint_function( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\AME\AppData\Local\Programs\Python\Python311\Lib\site-packages\fastapi\routing.py", line 190, in run_endpoint_function return await dependant.call(**values) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "c:\Users\AME\Documents\PriceChecker-master\discogs-master\dist\vinyl-price-suggester-main\VinylPrices\tuner\Jobb_server_server\server.py", line 843, in predict json_data = json.loads(obj) ^^^^^^^^^^^^^^^json_objects = responded.text.split("▲") json_objects = json_objects[0].split("\x1e") print(json_objects) texts = [] for obj in json_objects: if obj: # Parse the JSON string json_data = json.loads(obj) print(json_data) if "arguments" in json_data and "messages" in json_data["arguments"][0]: for message in json_data["arguments"][0]["messages"]: texts = message["text"] # Look for adaptiveCards in the message if "adaptiveCards" in message: for adaptiveCard in message["adaptiveCards"]: # Continue only if 'body' is in the adaptiveCard if "body" in adaptiveCard: # Now extract texts with URLs where type is 'TextBlock' for item in adaptiveCard["body"]: if item["type"] == "TextBlock" and "text" in item: # Split text by whitespace and search for URLs urls = item["text"] # texts should now contain all extracted text field File "C:\Users\AME\AppData\Local\Programs\Python\Python311\Lib\json_.py", line 346, in loads return _default_decoder.decode(s) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\AME\AppData\Local\Programs\Python\Python311\Lib\json\decoder.py", line 337, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\AME\AppData\Local\Programs\Python\Python311\Lib\json\decoder.py", line 353, in raw_decode obj, end = self.scan_once(s, idx) ^^^^^^^^^^^^^^^^^^^^^^ json.decoder.JSONDecodeError: Unterminated string starting at: line 1 column 63 (char 62) - Assistant
The traceback you have provided indicates that an exception occurred due to a JSON decoding error in your FastAPI application. The pertinent part of the traceback is:
json.decoder.JSONDecodeError: Unterminated string starting at: line 1 column 63 (char 62)This error is caused by trying to decode a JSON string that is not properly formatted -- specifically, it has an unterminated string. This means that somewhere in the JSON data there is an opening quote that is not properly closed with a corresponding closing quote.