Openstack Trove - Polling request timed out - python

We are trying to deploy OpenStack environment for our application and while deploying trove service we are facing the below error:
File "/usr/lib/python3/dist-packages/trove/common/utils.py", line 207, in wait_for_task
return polling_task.wait()
File "/usr/lib/python3/dist-packages/eventlet/event.py", line 125, in wait
result = hub.switch()
File "/usr/lib/python3/dist-packages/eventlet/hubs/hub.py", line 313, in switch
return self.greenlet.switch()
File "/usr/lib/python3/dist-packages/oslo_service/loopingcall.py", line 154, in _run_loop
idle = idle_for_func(result, self._elapsed(watch))
File "/usr/lib/python3/dist-packages/oslo_service/loopingcall.py", line 349, in _idle_for
raise LoopingCallTimeOut(
oslo_service.loopingcall.LoopingCallTimeOut:
Looping call timed out after 870.99 seconds
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/trove/taskmanager/models.py", line 434, in wait_for_instance
utils.poll_until(self._service_is_active,
File "/usr/lib/python3/dist-packages/trove/common/utils.py", line 223, in poll_until
return wait_for_task(task)
File "/usr/lib/python3/dist-packages/trove/common/utils.py", line 209, in wait_for_task
raise exception.PollTimeOut
trove.common.exception.PollTimeOut: Polling request timed out.```

Related

py4j.protocol.Py4JNetworkError: An error occurred while trying to connect to the Java server (127.0.0.1:25333)

I was running a server within a docker container, the package and image were provided by others so I can't access the code but only the tar.gz package, and I have no idea what services this container is providing.
It worked right several days ago and was not working since one restart, then I restarted it several times trying to get it to run, but it still has the same error. Is there any chance to make it run without touching the code since I cannot? Here is the error description:
P29 2022-05-25 10:59:24,923 INFO [lib_dataserver_exp.py:137] backend config: backend.conf
P29 2022-05-25 10:59:25,046 INFO [data_server.py:134] starting helper: java -Xmx32g -Dmoqi.logfile=helper -jar /root/fm-package/backend/backend.jar -c /root/fm-package/backend/backend.conf helper
Traceback (most recent call last):
File "/opt/conda/lib/python3.6/site-packages/py4j/java_gateway.py", line 958, in _get_connection
connection = self.deque.pop()
IndexError: pop from an empty deque
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/opt/conda/lib/python3.6/site-packages/py4j/java_gateway.py", line 1096, in start
self.socket.connect((self.address, self.port))
ConnectionRefusedError: [Errno 111] Connection refused
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/opt/conda/lib/python3.6/site-packages/fabric/main.py", line 763, in main
*args, **kwargs
File "/opt/conda/lib/python3.6/site-packages/fabric/tasks.py", line 427, in execute
results['<local-only>'] = task.run(*args, **new_kwargs)
File "/opt/conda/lib/python3.6/site-packages/fabric/tasks.py", line 174, in run
return self.wrapped(*args, **kwargs)
File "/builds/fingerprint-core/fingerprint-matching/fm_lib/data_server/lib_dataserver_exp.py", line 151, in start_dataserver
File "/builds/fingerprint-core/fingerprint-matching/fm_lib/data_server/data_server.py", line 648, in __init__
File "/builds/fingerprint-core/fingerprint-matching/fm_lib/data_server/data_server.py", line 140, in __init__
File "/opt/conda/lib/python3.6/site-packages/py4j/java_gateway.py", line 1284, in __call__
answer = self.gateway_client.send_command(command)
File "/opt/conda/lib/python3.6/site-packages/py4j/java_gateway.py", line 1012, in send_command
connection = self._get_connection()
File "/opt/conda/lib/python3.6/site-packages/py4j/java_gateway.py", line 960, in _get_connection
connection = self._create_connection()
File "/opt/conda/lib/python3.6/site-packages/py4j/java_gateway.py", line 966, in _create_connection
connection.start()
File "/opt/conda/lib/python3.6/site-packages/py4j/java_gateway.py", line 1108, in start
raise Py4JNetworkError(msg, e)
py4j.protocol.Py4JNetworkError: An error occurred while trying to connect to the Java server (127.0.0.1:25333)
failed to send log to fluentd

Ib_insync error asyncio.exceptions.TimeoutError while running IB gateaway on server

I'm using docker image to run ib gateaway on remote server, the gateaway is running but when using ib_insync to connect and get data i'm getting asyncio.exceptions.TimeoutError
This is the full log:
Traceback (most recent call last):
File "C:\Users\AppData\Local\Programs\Python\Python39\lib\asyncio\tasks.py", line 688, in _wrap_awaitable
return (yield from awaitable.__await__())
asyncio.exceptions.CancelledError
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\AppData\Local\Programs\Python\Python39\lib\asyncio\tasks.py", line 490, in wait_for
return fut.result()
asyncio.exceptions.CancelledError
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "C:\Users\Desktop\tutorial\tutorial\spiders\IB-TEST\main.py", line 11, in <module>
ib.connect('ip', port, clientId=2)
File "C:\Users\Desktop\tutorial\tutorial\spiders\IB-TEST\venv\lib\site-packages\ib_insync\ib.py", line 269, in connect
return self._run(self.connectAsync(
File "C:\Users\Desktop\tutorial\tutorial\spiders\IB-TEST\venv\lib\site-packages\ib_insync\ib.py", line 308, in _run
return util.run(*awaitables, timeout=self.RequestTimeout)
File "C:\Users\Desktop\tutorial\tutorial\spiders\IB-TEST\venv\lib\site-packages\ib_insync\util.py", line 332, in run
result = loop.run_until_complete(task)
File "C:\Users\AppData\Local\Programs\Python\Python39\lib\asyncio\base_events.py", line 642, in run_until_complete
return future.result()
File "C:\Users\Desktop\tutorial\tutorial\spiders\IB-TEST\venv\lib\site-packages\ib_insync\ib.py", line 1626, in connectAsync
await self.client.connectAsync(host, port, clientId, timeout)
File "C:\Users\Desktop\tutorial\tutorial\spiders\IB-TEST\venv\lib\site-packages\ib_insync\client.py", line 216, in connectAsync
await asyncio.wait_for(self.apiStart, timeout)
File "C:\Users\AppData\Local\Programs\Python\Python39\lib\asyncio\tasks.py", line 492, in wait_for
raise exceptions.TimeoutError() from exc
asyncio.exceptions.TimeoutError
Any idea what can cause it?

Error during execution: docker-compose run --rm api python3 manage.py migrate

I am trying to install saleor on Linux Mint according to the instructions
https://docs.saleor.io/docs/3.0/developer/installation
When executing the command
docker-compose run --rm api python3 manage.py migrate
I get an error. This is the stack trace. How do I resolve this issue?
$docker-compose run --rm api python3 manage.py migrate
Starting saleor-platform_db_1 ...
Starting saleor-platform_jaeger_1 ... done
Starting saleor-platform_redis_1 ... done
ERROR: for saleor-platform_db_1 a bytes-like object is required, not 'str'
ERROR: for db a bytes-like object is required, not 'str'
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/docker/api/client.py", line 261, in _raise_for_status
response.raise_for_status()
File "/usr/lib/python3/dist-packages/requests/models.py", line 940, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 500 Server Error: Internal Server Error for url: http+docker://localhost/v1.22/containers/c015b9d2a6e0ba06c8cc393147db2a4eb1a0fc72d1ae2805e177b409bb8212db/start
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/compose/service.py", line 625, in start_container
container.start()
File "/usr/lib/python3/dist-packages/compose/container.py", line 241, in start
return self.client.start(self.id, **options)
File "/usr/lib/python3/dist-packages/docker/utils/decorators.py", line 19, in wrapped
return f(self, resource_id, *args, **kwargs)
File "/usr/lib/python3/dist-packages/docker/api/container.py", line 1095, in start
self._raise_for_status(res)
File "/usr/lib/python3/dist-packages/docker/api/client.py", line 263, in _raise_for_status
raise create_api_error_from_http_exception(e)
File "/usr/lib/python3/dist-packages/docker/errors.py", line 31, in create_api_error_from_http_exception
raise cls(e, response=response, explanation=explanation)
docker.errors.APIError: 500 Server Error: Internal Server Error ("b'driver failed programming external connectivity on endpoint saleor-platform_db_1 (1b57cb27e18e4e18fad1fde3f6bebb573260974514be140c7e4e0d74d663b7b0): Error starting userland proxy: listen tcp4 0.0.0.0:5432: bind: address already in use'")
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/bin/docker-compose", line 11, in <module>
load_entry_point('docker-compose==1.25.0', 'console_scripts', 'docker-compose')()
File "/usr/lib/python3/dist-packages/compose/cli/main.py", line 72, in main
command()
File "/usr/lib/python3/dist-packages/compose/cli/main.py", line 128, in perform_command
handler(command, command_options)
File "/usr/lib/python3/dist-packages/compose/cli/main.py", line 896, in run
run_one_off_container(
File "/usr/lib/python3/dist-packages/compose/cli/main.py", line 1343, in run_one_off_container
project.up(
File "/usr/lib/python3/dist-packages/compose/project.py", line 565, in up
results, errors = parallel.parallel_execute(
File "/usr/lib/python3/dist-packages/compose/parallel.py", line 112, in parallel_execute
raise error_to_reraise
File "/usr/lib/python3/dist-packages/compose/parallel.py", line 210, in producer
result = func(obj)
File "/usr/lib/python3/dist-packages/compose/project.py", line 548, in do
return service.execute_convergence_plan(
File "/usr/lib/python3/dist-packages/compose/service.py", line 567, in execute_convergence_plan
return self._execute_convergence_start(
File "/usr/lib/python3/dist-packages/compose/service.py", line 506, in _execute_convergence_start
_, errors = parallel_execute(
File "/usr/lib/python3/dist-packages/compose/parallel.py", line 112, in parallel_execute
raise error_to_reraise
File "/usr/lib/python3/dist-packages/compose/parallel.py", line 210, in producer
result = func(obj)
File "/usr/lib/python3/dist-packages/compose/service.py", line 508, in <lambda>
lambda c: self.start_container_if_stopped(c, attach_logs=not detached, quiet=True),
File "/usr/lib/python3/dist-packages/compose/service.py", line 620, in start_container_if_stopped
return self.start_container(container)
File "/usr/lib/python3/dist-packages/compose/service.py", line 627, in start_container
if "driver failed programming external connectivity" in ex.explanation:
TypeError: a bytes-like object is required, not 'str'
Error in sys.excepthook:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/apport_python_hook.py", line 153, in apport_excepthook
with os.fdopen(os.open(pr_filename,
FileNotFoundError: [Errno 2] No such file or directory: '/var/crash/_usr_bin_docker-compose.1000.crash'
Original exception was:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/docker/api/client.py", line 261, in _raise_for_status
response.raise_for_status()
File "/usr/lib/python3/dist-packages/requests/models.py", line 940, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 500 Server Error: Internal Server Error for url: http+docker://localhost/v1.22/containers/c015b9d2a6e0ba06c8cc393147db2a4eb1a0fc72d1ae2805e177b409bb8212db/start
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/compose/service.py", line 625, in start_container
container.start()
File "/usr/lib/python3/dist-packages/compose/container.py", line 241, in start
return self.client.start(self.id, **options)
File "/usr/lib/python3/dist-packages/docker/utils/decorators.py", line 19, in wrapped
return f(self, resource_id, *args, **kwargs)
File "/usr/lib/python3/dist-packages/docker/api/container.py", line 1095, in start
self._raise_for_status(res)
File "/usr/lib/python3/dist-packages/docker/api/client.py", line 263, in _raise_for_status
raise create_api_error_from_http_exception(e)
File "/usr/lib/python3/dist-packages/docker/errors.py", line 31, in create_api_error_from_http_exception
raise cls(e, response=response, explanation=explanation)
docker.errors.APIError: 500 Server Error: Internal Server Error ("b'driver failed programming external connectivity on endpoint saleor-platform_db_1 (1b57cb27e18e4e18fad1fde3f6bebb573260974514be140c7e4e0d74d663b7b0): Error starting userland proxy: listen tcp4 0.0.0.0:5432: bind: address already in use'")
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/bin/docker-compose", line 11, in <module>
load_entry_point('docker-compose==1.25.0', 'console_scripts', 'docker-compose')()
File "/usr/lib/python3/dist-packages/compose/cli/main.py", line 72, in main
command()
File "/usr/lib/python3/dist-packages/compose/cli/main.py", line 128, in perform_command
handler(command, command_options)
File "/usr/lib/python3/dist-packages/compose/cli/main.py", line 896, in run
run_one_off_container(
File "/usr/lib/python3/dist-packages/compose/cli/main.py", line 1343, in run_one_off_container
project.up(
File "/usr/lib/python3/dist-packages/compose/project.py", line 565, in up
results, errors = parallel.parallel_execute(
File "/usr/lib/python3/dist-packages/compose/parallel.py", line 112, in parallel_execute
raise error_to_reraise
File "/usr/lib/python3/dist-packages/compose/parallel.py", line 210, in producer
result = func(obj)
File "/usr/lib/python3/dist-packages/compose/project.py", line 548, in do
return service.execute_convergence_plan(
File "/usr/lib/python3/dist-packages/compose/service.py", line 567, in execute_convergence_plan
return self._execute_convergence_start(
File "/usr/lib/python3/dist-packages/compose/service.py", line 506, in _execute_convergence_start
_, errors = parallel_execute(
File "/usr/lib/python3/dist-packages/compose/parallel.py", line 112, in parallel_execute
raise error_to_reraise
File "/usr/lib/python3/dist-packages/compose/parallel.py", line 210, in producer
result = func(obj)
File "/usr/lib/python3/dist-packages/compose/service.py", line 508, in <lambda>
lambda c: self.start_container_if_stopped(c, attach_logs=not detached, quiet=True),
File "/usr/lib/python3/dist-packages/compose/service.py", line 620, in start_container_if_stopped
return self.start_container(container)
File "/usr/lib/python3/dist-packages/compose/service.py", line 627, in start_container
if "driver failed programming external connectivity" in ex.explanation:
TypeError: a bytes-like object is required, not 'str'

Pycharm debugger throws Bad file descriptor error when using dask distributed

I am using the most lightweight/simple dask multiprocessing which is the non-cluster local Client:
from distributed import Client
client = Client()
Even so: the first instance of invoking dask.bag.compute() results in the following:
Connected to pydev debugger (build 191.7141.48)
Traceback (most recent call last):
File "/Applications/PyCharm.app/Contents/helpers/pydev/_pydevd_bundle/pydevd_comm.py", line 383, in _on_run
r = self.sock.recv(1024)
OSError: [Errno 9] Bad file descriptor
Traceback (most recent call last):
File "/Applications/PyCharm.app/Contents/helpers/pydev/_pydevd_bundle/pydevd_comm.py", line 383, in _on_run
r = self.sock.recv(1024)
OSError: [Errno 9] Bad file descriptor
Traceback (most recent call last):
File "/Applications/PyCharm.app/Contents/helpers/pydev/_pydevd_bundle/pydevd_comm.py", line 383, in _on_run
r = self.sock.recv(1024)
OSError: [Errno 9] Bad file descriptor
The result is that you can more or less flip a coin on whether the program will proceed or error out with a communication exception. Here is what happens when the flip comes up "tails":
Connected to pydev debugger (build 191.7141.48)
Traceback (most recent call last):
File "/Applications/PyCharm.app/Contents/helpers/pydev/_pydevd_bundle/pydevd_comm.py", line 383, in _on_run
r = self.sock.recv(1024)
OSError: [Errno 9] Bad file descriptor
Process ForkServerProcess-3:
Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/distributed/core.py", line 178, in __init__
from .counter import Digest
ImportError: cannot import name 'Digest' from 'distributed.counter' (/usr/local/lib/python3.7/site-packages/distributed/counter.py)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/Cellar/python/3.7.3/Frameworks/Python.framework/Versions/3.7/lib/python3.7/multiprocessing/process.py", line 297, in _bootstrap
self.run()
File "/usr/local/Cellar/python/3.7.3/Frameworks/Python.framework/Versions/3.7/lib/python3.7/multiprocessing/process.py", line 99, in run
self._target(*self._args, **self._kwargs)
File "/usr/local/lib/python3.7/site-packages/distributed/process.py", line 181, in _run
target(*args, **kwargs)
File "/usr/local/lib/python3.7/site-packages/distributed/nanny.py", line 587, in _run
worker = Worker(*worker_args, **worker_kwargs)
File "/usr/local/lib/python3.7/site-packages/distributed/worker.py", line 552, in __init__
**kwargs
File "/usr/local/lib/python3.7/site-packages/distributed/node.py", line 76, in __init__
io_loop=self.io_loop,
File "/usr/local/lib/python3.7/site-packages/distributed/core.py", line 180, in __init__
self.digests = defaultdict(partial(Digest, loop=self.io_loop))
File "/usr/local/Cellar/python/3.7.3/Frameworks/Python.framework/Versions/3.7/lib/python3.7/contextlib.py", line 130, in __exit__
self.gen.throw(type, value, traceback)
File "/usr/local/lib/python3.7/site-packages/distributed/utils.py", line 179, in ignoring
yield
SystemError: error return without exception set
distributed.nanny - WARNING - Worker process 20417 exited with status 1
Traceback (most recent call last):
File "_pydevd_frame_eval/pydevd_frame_evaluator_darwin_37_64.pyx", line 95, in _pydevd_frame_eval.pydevd_frame_evaluator_darwin_37_64.get_bytecode_while_frame_eval
KeyError: '/usr/local/lib/python3.7/site-packages/distributed/bokeh/__init__.py'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Applications/PyCharm.app/Contents/helpers/pydev/pydevd.py", line 1758, in <module>
main()
File "/Applications/PyCharm.app/Contents/helpers/pydev/pydevd.py", line 1752, in main
globals = debugger.run(setup['file'], None, None, is_module)
File "/Applications/PyCharm.app/Contents/helpers/pydev/pydevd.py", line 1147, in run
pydev_imports.execfile(file, globals, locals) # execute the script
File "/Applications/PyCharm.app/Contents/helpers/pydev/_pydev_imps/_pydev_execfile.py", line 18, in execfile
exec(compile(contents+"\n", file, 'exec'), glob, loc)
File "/git/huddl/python/hamspam/enron.py", line 205, in <module>
client = Client()
File "/usr/local/lib/python3.7/site-packages/distributed/client.py", line 712, in __init__
self.start(timeout=timeout)
File "/usr/local/lib/python3.7/site-packages/distributed/client.py", line 858, in start
sync(self.loop, self._start, **kwargs)
File "/usr/local/lib/python3.7/site-packages/distributed/utils.py", line 331, in sync
six.reraise(*error[0])
File "/usr/local/lib/python3.7/site-packages/six.py", line 693, in reraise
raise value
File "/usr/local/lib/python3.7/site-packages/distributed/utils.py", line 316, in f
result[0] = yield future
File "/usr/local/lib/python3.7/site-packages/tornado/gen.py", line 729, in run
value = future.result()
File "/usr/local/lib/python3.7/site-packages/tornado/gen.py", line 736, in run
yielded = self.gen.throw(*exc_info) # type: ignore
File "/usr/local/lib/python3.7/site-packages/distributed/client.py", line 928, in _start
yield self.cluster
File "/usr/local/lib/python3.7/site-packages/tornado/gen.py", line 729, in run
value = future.result()
File "/usr/local/Cellar/python/3.7.3/Frameworks/Python.framework/Versions/3.7/lib/python3.7/asyncio/tasks.py", line 603, in _wrap_awaitable
return (yield from awaitable.__await__())
File "/usr/local/lib/python3.7/site-packages/tornado/gen.py", line 736, in run
yielded = self.gen.throw(*exc_info) # type: ignore
File "/usr/local/lib/python3.7/site-packages/distributed/deploy/local.py", line 284, in _start
yield [self._start_worker(**self.worker_kwargs) for i in range(n_workers)]
File "/usr/local/lib/python3.7/site-packages/tornado/gen.py", line 729, in run
value = future.result()
File "/usr/local/lib/python3.7/site-packages/tornado/gen.py", line 501, in callback
result_list.append(f.result())
File "/usr/local/lib/python3.7/site-packages/tornado/gen.py", line 742, in run
yielded = self.gen.send(value)
File "/usr/local/lib/python3.7/site-packages/distributed/deploy/local.py", line 316, in _start_worker
raise gen.TimeoutError("Worker failed to start")
tornado.util.TimeoutError: Worker failed to start
Any advice on this?
There will be even more issues/complications when trying to use a LocalCluster mode -but that will be saved for a different question.

Connection errors due to webpage navigation

I am having some trouble with connection errors in my Django app when a user navigates to a different page before AJAX call is finished.
So, when the client-side sends several AJAX calls for save/load/retrieve data etc., and when a user navigates to a different page - say when an AJAX call was just made from the client side to save the content, the content is saved and the functionally everything is fine, but I keep getting this error:
Exception happened during processing of request from ('127.0.0.1', 50646)
Traceback (most recent call last):
File "D:\Applications\WinPython-64bit-3.5.3.1Qt5\python-3.5.3.amd64\lib\wsgiref\handlers.py", line 138, in run
self.finish_response()
File "D:\Applications\WinPython-64bit-3.5.3.1Qt5\python-3.5.3.amd64\lib\wsgiref\handlers.py", line 180, in finish_response
self.write(data)
File "D:\Applications\WinPython-64bit-3.5.3.1Qt5\python-3.5.3.amd64\lib\wsgiref\handlers.py", line 274, in write
self.send_headers()
File "D:\Applications\WinPython-64bit-3.5.3.1Qt5\python-3.5.3.amd64\lib\wsgiref\handlers.py", line 332, in send_headers
self.send_preamble()
File "D:\Applications\WinPython-64bit-3.5.3.1Qt5\python-3.5.3.amd64\lib\wsgiref\handlers.py", line 255, in send_preamble
('Date: %s\r\n' % format_date_time(time.time())).encode('iso-8859-1')
File "D:\Applications\WinPython-64bit-3.5.3.1Qt5\python-3.5.3.amd64\lib\wsgiref\handlers.py", line 453, in _write
result = self.stdout.write(data)
File "D:\Applications\WinPython-64bit-3.5.3.1Qt5\python-3.5.3.amd64\lib\socket.py", line 594, in write
return self._sock.send(b)
ConnectionAbortedError: [WinError 10053] An established connection was aborted by the software in your host machine
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "D:\Applications\WinPython-64bit-3.5.3.1Qt5\python-3.5.3.amd64\lib\wsgiref\handlers.py", line 141, in run
self.handle_error()
File "D:\Applications\WinPython-64bit-3.5.3.1Qt5\python-3.5.3.amd64\lib\site-packages\django\core\servers\basehttp.py", line 88, in handle_error
super(ServerHandler, self).handle_error()
File "D:\Applications\WinPython-64bit-3.5.3.1Qt5\python-3.5.3.amd64\lib\wsgiref\handlers.py", line 368, in handle_error
self.finish_response()
File "D:\Applications\WinPython-64bit-3.5.3.1Qt5\python-3.5.3.amd64\lib\wsgiref\handlers.py", line 180, in finish_response
self.write(data)
File "D:\Applications\WinPython-64bit-3.5.3.1Qt5\python-3.5.3.amd64\lib\wsgiref\handlers.py", line 274, in write
self.send_headers()
File "D:\Applications\WinPython-64bit-3.5.3.1Qt5\python-3.5.3.amd64\lib\wsgiref\handlers.py", line 331, in send_headers
if not self.origin_server or self.client_is_modern():
File "D:\Applications\WinPython-64bit-3.5.3.1Qt5\python-3.5.3.amd64\lib\wsgiref\handlers.py", line 344, in client_is_modern
return self.environ['SERVER_PROTOCOL'].upper() != 'HTTP/0.9'
TypeError: 'NoneType' object is not subscriptable
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "D:\Applications\WinPython-64bit-3.5.3.1Qt5\python-3.5.3.amd64\lib\socketserver.py", line 625, in process_request_thread
self.finish_request(request, client_address)
File "D:\Applications\WinPython-64bit-3.5.3.1Qt5\python-3.5.3.amd64\lib\socketserver.py", line 354, in finish_request
self.RequestHandlerClass(request, client_address, self)
File "D:\Applications\WinPython-64bit-3.5.3.1Qt5\python-3.5.3.amd64\lib\socketserver.py", line 681, in __init__
self.handle()
File "D:\Applications\WinPython-64bit-3.5.3.1Qt5\python-3.5.3.amd64\lib\site-packages\django\core\servers\basehttp.py", line 155, in handle
handler.run(self.server.get_app())
File "D:\Applications\WinPython-64bit-3.5.3.1Qt5\python-3.5.3.amd64\lib\wsgiref\handlers.py", line 144, in run
self.close()
File "D:\Applications\WinPython-64bit-3.5.3.1Qt5\python-3.5.3.amd64\lib\wsgiref\simple_server.py", line 36, in close
self.status.split(' ',1)[0], self.bytes_sent
AttributeError: 'NoneType' object has no attribute 'split'
For example, an AJAX call for the URL /xyz/save/ is sent, and before its callback is executed on the client side, the user navigates to a URL /xyz/abc, I get the above error. I understand that the connection for /xyz/save/ is interrupted, how do I avoid this?

Categories

Resources